Exception/error handling changes

git-svn-id: http://munki.googlecode.com/svn/trunk@373 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-19 03:22:52 +00:00
parent 37fb8225f9
commit c1ea0d202d

View File

@@ -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"])