summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-03-14 15:51:51 +0000
committerErik Troan <ewt@redhat.com>2001-03-14 15:51:51 +0000
commitc17c178b1f1445cd0786a6700e855a67d3087666 (patch)
tree9c2e3c5e6853c19c1c7ee56bc6aa883ac1600f6f /upgrade.py
parentbb252e6c2905a58a36bded3297d479b261c4cdc5 (diff)
downloadanaconda-c17c178b1f1445cd0786a6700e855a67d3087666.tar.gz
anaconda-c17c178b1f1445cd0786a6700e855a67d3087666.tar.xz
anaconda-c17c178b1f1445cd0786a6700e855a67d3087666.zip
swapfileExists() worked much too hard
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/upgrade.py b/upgrade.py
index 69a5f6ece..1421f494b 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -152,18 +152,11 @@ def swapSuggestion(instPath, fstab):
def swapfileExists(swapname):
- if os.access(swapname, os.R_OK):
- return 1
-
- exists = 0
try:
rc = os.lstat(swapname)
- exists = 1
+ return 1
except:
- pass
-
- return exists
-
+ return 0
def createSwapFile(instPath, theFstab, mntPoint, size, progressWindow):
fstabPath = instPath + "/etc/fstab"
@@ -185,11 +178,3 @@ def createSwapFile(instPath, theFstab, mntPoint, size, progressWindow):
f.write(fstab.fstabFormatString % (prefix + file, "swap", "swap", "defaults",
0, 0))
f.close()
-
-
-
-
-
-
-
-