Improved exception handling

git-svn-id: http://munki.googlecode.com/svn/trunk@658 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2010-08-04 23:07:18 +00:00
parent 981afa2e3a
commit c3188102e7
+2 -2
View File
@@ -160,7 +160,7 @@ def checkForSoftwareUpdates():
LastResultCode = int(str(out).rstrip('\n'))
if LastResultCode > 2:
retcode = LastResultCode
except ValueError:
except (ValueError, TypeError):
retcode = 0
if retcode:
@@ -359,7 +359,7 @@ def appleSoftwareUpdatesAvailable(forcecheck=False, suppresscheck=False):
lastSUcheck = NSDate.dateWithString_(lastSUcheckString)
interval = 24 * 60 * 60
nextSUcheck = lastSUcheck.dateByAddingTimeInterval_(interval)
except ValueError:
except (ValueError, TypeError):
pass
if now.timeIntervalSinceDate_(nextSUcheck) >= 0:
retcode = checkForSoftwareUpdates()