mirror of
https://github.com/munki/munki.git
synced 2026-01-24 07:59:19 -06:00
Cleanup exception handling.
git-svn-id: http://munki.googlecode.com/svn/trunk@361 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -579,13 +579,16 @@ def run():
|
||||
if os.path.exists(installinfo):
|
||||
try:
|
||||
pl = FoundationPlist.readPlist(installinfo)
|
||||
except:
|
||||
except FoundationPlist.NSPropertyListSerializationException:
|
||||
print >>sys.stderr, "Invalid %s" % installinfo
|
||||
return -1
|
||||
|
||||
# remove the install info file
|
||||
# it's no longer valid once we start running
|
||||
os.unlink(installinfo)
|
||||
try:
|
||||
os.unlink(installinfo)
|
||||
except (OSError, IOError):
|
||||
munkicommon.display_warning("Could not remove %s" % installinfo)
|
||||
|
||||
if "removals" in pl:
|
||||
# filter list to items that need to be removed
|
||||
|
||||
Reference in New Issue
Block a user