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