mirror of
https://github.com/munki/munki.git
synced 2026-04-23 13:29:26 -05:00
Cleaned up exception handling
git-svn-id: http://munki.googlecode.com/svn/trunk@357 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user