mirror of
https://github.com/munki/munki.git
synced 2026-04-23 04:59:17 -05:00
Cleaned up exception handling
git-svn-id: http://munki.googlecode.com/svn/trunk@356 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -169,7 +169,7 @@ def getBundleInfo(path):
|
||||
try:
|
||||
pl = FoundationPlist.readPlist(infopath)
|
||||
return pl
|
||||
except:
|
||||
except FoundationPlist.NSPropertyListSerializationException:
|
||||
pass
|
||||
|
||||
return None
|
||||
@@ -245,7 +245,7 @@ def getiteminfo(itempath):
|
||||
elif 'CFBundleVersion' in pl:
|
||||
infodict['CFBundleShortVersionString'] = \
|
||||
pl['CFBundleVersion'].split()[0]
|
||||
except:
|
||||
except FoundationPlist.NSPropertyListSerializationException:
|
||||
pass
|
||||
|
||||
if not 'CFBundleShortVersionString' in infodict:
|
||||
@@ -293,10 +293,7 @@ def main():
|
||||
|
||||
catinfo = {}
|
||||
installs = []
|
||||
try:
|
||||
item = arguments[0].rstrip("/")
|
||||
except:
|
||||
item = ''
|
||||
item = arguments[0].rstrip("/")
|
||||
if item and os.path.exists(item):
|
||||
# get size of installer item
|
||||
itemsize = 0
|
||||
|
||||
Reference in New Issue
Block a user