summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-03-17 11:28:51 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-03-18 09:21:50 -1000
commitbd18c5370cacbac9a88074d8b0b66f1824c9cdb7 (patch)
tree4fdd73fbadebc290aece1fb220bd676a6be4bd40 /image.py
parente892c1599e9f8b2694a473bd709b0717aa5cb8b8 (diff)
downloadanaconda-bd18c5370cacbac9a88074d8b0b66f1824c9cdb7.tar.gz
anaconda-bd18c5370cacbac9a88074d8b0b66f1824c9cdb7.tar.xz
anaconda-bd18c5370cacbac9a88074d8b0b66f1824c9cdb7.zip
Use booleans in isys.mount() and isys.umount()
Use True/False over 1/0. It's the future.
Diffstat (limited to 'image.py')
-rw-r--r--image.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/image.py b/image.py
index 83e74dbb2..dea1e40d1 100644
--- a/image.py
+++ b/image.py
@@ -47,7 +47,7 @@ def findIsoImages(path, messageWindow):
try:
isys.mount("/dev/loop2", "/mnt/cdimage", fstype = "iso9660",
- readOnly = 1)
+ readOnly = True)
for num in range(1, 10):
if os.access("/mnt/cdimage/.discinfo", os.R_OK):
f = open("/mnt/cdimage/.discinfo")
@@ -95,7 +95,7 @@ def findIsoImages(path, messageWindow):
discImages[num] = file
- isys.umount("/mnt/cdimage", removeDir=0)
+ isys.umount("/mnt/cdimage", removeDir=False)
except SystemError:
pass
@@ -179,7 +179,7 @@ def mountImage(isodir, tree, discnum, messageWindow, discImages={}):
try:
isoImage = "%s/%s" % (isodir, discImages[discnum])
isys.losetup("/dev/loop1", isoImage, readOnly = 1)
- isys.mount("/dev/loop1", tree, fstype = 'iso9660', readOnly = 1);
+ isys.mount("/dev/loop1", tree, fstype = 'iso9660', readOnly = True);
break
except:
ans = messageWindow(_("Missing ISO 9660 Image"),
@@ -255,7 +255,7 @@ def scanForMedia(tree, storage):
continue
try:
- if isys.mount(dev.path, tree, fstype="iso9660", readOnly=1):
+ if isys.mount(dev.path, tree, fstype="iso9660", readOnly=True):
continue
except:
continue
@@ -270,7 +270,7 @@ def scanForMedia(tree, storage):
def umountImage(tree, currentMedia):
if currentMedia is not None:
- isys.umount(tree, removeDir=0)
+ isys.umount(tree, removeDir=False)
isys.unlosetup("/dev/loop1")
def unmountCD(path, messageWindow):
@@ -279,7 +279,7 @@ def unmountCD(path, messageWindow):
while True:
try:
- isys.umount(path, removeDir=0)
+ isys.umount(path, removeDir=False)
break
except Exception, e:
log.error("exception in _unmountCD: %s" %(e,))