Cleaned up exception handling

git-svn-id: http://munki.googlecode.com/svn/trunk@356 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-18 04:39:24 +00:00
parent 5ea46d211b
commit 827c4b5264
+3 -6
View File
@@ -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