summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2007-01-04 19:03:57 +0000
committerPeter Jones <pjones@redhat.com>2007-01-04 19:03:57 +0000
commit79d72b89f87c1793f6cb647d6aaf34d17bef07e9 (patch)
tree897e0fdd3ac4a948514e33f6b0b9015502264f74 /iutil.py
parentcec1c36b7cbb4ed9168694ee30c9296450bbb9ae (diff)
downloadanaconda-79d72b89f87c1793f6cb647d6aaf34d17bef07e9.tar.gz
anaconda-79d72b89f87c1793f6cb647d6aaf34d17bef07e9.tar.xz
anaconda-79d72b89f87c1793f6cb647d6aaf34d17bef07e9.zip
- Don't log an error just because we're making a directory that already exists.
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/iutil.py b/iutil.py
index d2bf0e736..02eccfcb7 100644
--- a/iutil.py
+++ b/iutil.py
@@ -15,6 +15,7 @@
import os, isys, string, stat
import os.path
+from errno import *
import rhpl
import warnings
import subprocess
@@ -156,8 +157,13 @@ def mkdirChain(dir):
try:
os.makedirs(dir, 0755)
except OSError, (errno, msg):
+ try:
+ if errno == EEXIST and stat.S_ISDIR(os.stat(dir).st_mode):
+ return
+ except:
+ pass
+
log.error("could not create directory %s: %s" % (dir, msg))
- pass
def swapAmount():
f = open("/proc/meminfo", "r")