summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-07-17 15:17:26 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-07-17 15:17:26 +0000
commit26e3b9ac481db35ed19143d88fb3e3fb87d05c5d (patch)
tree6cc204958034778027371662a64c2385c6c59cb1 /src/lib
parent18b8880cdb8fb99facafe79517bf850635affbca (diff)
downloadbcfg2-26e3b9ac481db35ed19143d88fb3e3fb87d05c5d.tar.gz
bcfg2-26e3b9ac481db35ed19143d88fb3e3fb87d05c5d.tar.bz2
bcfg2-26e3b9ac481db35ed19143d88fb3e3fb87d05c5d.zip
Make InstallDirectory control flow more obvious
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3459 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Tools/POSIX.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py
index f571e544c..783e3192a 100644
--- a/src/lib/Client/Tools/POSIX.py
+++ b/src/lib/Client/Tools/POSIX.py
@@ -197,14 +197,14 @@ class POSIX(Bcfg2.Client.Tools.Tool):
current = '/'+'/'.join(parent.split('/')[1:2+idx])
try:
sloc = os.stat(current)
+ except OSError:
try:
- if not S_ISDIR(sloc[ST_MODE]):
- os.unlink(current)
- os.mkdir(current)
+ os.mkdir(current)
except OSError:
return False
- except OSError:
+ if not S_ISDIR(sloc[ST_MODE]):
try:
+ os.unlink(current)
os.mkdir(current)
except OSError:
return False