diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | iutil.py | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2007-01-04 Peter Jones <pjones@redhat.com> + + * iutil.py (mkdirChain): Don't log an error just because we're making + a directory that already exists. + 2007-01-04 Jeremy Katz <katzj@redhat.com> * loader2/modules.c (scsiDiskCount): Include cdroms in the count @@ -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") |