Cleaned up exception handling

git-svn-id: http://munki.googlecode.com/svn/trunk@357 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-18 04:43:50 +00:00
parent 827c4b5264
commit 0b55bf27ae
+3 -3
View File
@@ -57,7 +57,7 @@ def clearLastNotifiedDate():
'/Library/Preferences/ManagedInstalls',
'LastNotifiedDate']
retcode = subprocess.call(cmd)
except:
except FoundationPlist.NSPropertyListSerializationException:
pass
@@ -66,7 +66,7 @@ def createDirsIfNeeded(dirlist):
if not os.path.exists(directory):
try:
os.mkdir(directory)
except:
except OSError, IOError:
print >>sys.stderr, "ERROR: Could not create %s" % directory
return False
@@ -343,7 +343,7 @@ def main():
pl = FoundationPlist.readPlist(installinfo)
updatesavailable = len(pl.get('removals',[])) or \
len(pl.get('managed_installs',[]))
except:
except FoundationPlist.NSPropertyListSerializationException:
munkicommon.display_error("Install info at %s is invalid." %
installinfo)