summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-11-14 10:24:15 -0500
committerJim Meyering <jim@meyering.net>2006-11-14 10:24:15 -0500
commit125e8001ed69d8c26b78fc04a06406af25ddf606 (patch)
treeaa0ed972ab13196f099b6672c3d1ea2e9dd45f55
parente8098467001523a137bc8b6a0366f7fa400e10c1 (diff)
downloadthird_party-cobbler-125e8001ed69d8c26b78fc04a06406af25ddf606.tar.gz
third_party-cobbler-125e8001ed69d8c26b78fc04a06406af25ddf606.tar.xz
third_party-cobbler-125e8001ed69d8c26b78fc04a06406af25ddf606.zip
Minor fix to /tftpboot code
-rw-r--r--cobbler/action_sync.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 01a8389..31784f8 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -612,10 +612,11 @@ class BootSync:
try:
os.unlink(path)
return True
- except:
- traceback.print_exc()
- raise cexceptions.CobblerException("no_delete",path)
-
+ except OSError, ioe:
+ if not ioe.errno == errno.ENOENT: # doesn't exist
+ traceback.print_exc()
+ raise cexceptions.CobblerException("no_delete",path)
+ return True
def rmtree(self,path):
"""
@@ -629,6 +630,7 @@ class BootSync:
except OSError, ioe:
if not ioe.errno == errno.ENOENT: # doesn't exist
raise cexceptions.CobblerException("no_delete",path)
+ return True
def mkdir(self,path,mode=0777):
"""