diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-11-14 10:24:15 -0500 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-11-14 10:24:15 -0500 |
commit | 125e8001ed69d8c26b78fc04a06406af25ddf606 (patch) | |
tree | aa0ed972ab13196f099b6672c3d1ea2e9dd45f55 | |
parent | e8098467001523a137bc8b6a0366f7fa400e10c1 (diff) | |
download | third_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.py | 10 |
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): """ |