mirror of
https://github.com/munki/munki.git
synced 2026-02-18 21:20:47 -06:00
Exception/error handling changes
git-svn-id: http://munki.googlecode.com/svn/trunk@373 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -192,6 +192,8 @@ def restartAlert():
|
||||
|
||||
def getStopButtonState():
|
||||
'''Returns 1 if the stop button has been clicked, 0 otherwise.'''
|
||||
if not s:
|
||||
return 0
|
||||
try:
|
||||
s.send(u"GETSTOPBUTTONSTATE: \n")
|
||||
state = readResponse()
|
||||
@@ -210,7 +212,7 @@ def quit():
|
||||
s.send(u"QUIT: \n")
|
||||
s.close()
|
||||
s = None
|
||||
except IOError:
|
||||
except (AttributeError, IOError):
|
||||
if getMunkiStatusPID():
|
||||
retcode = subprocess.call(["/usr/bin/killall", "MunkiStatus"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user