diff options
author | Peter Jones <pjones@redhat.com> | 2007-01-04 19:03:57 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2007-01-04 19:03:57 +0000 |
commit | 79d72b89f87c1793f6cb647d6aaf34d17bef07e9 (patch) | |
tree | 897e0fdd3ac4a948514e33f6b0b9015502264f74 /iutil.py | |
parent | cec1c36b7cbb4ed9168694ee30c9296450bbb9ae (diff) | |
download | anaconda-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.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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") |