Poll if HUD window is already terminated before attempting to
communicate the \n character to tell it to terminate.
This commit is contained in:
parent
a6c2152be4
commit
a76442f67e
|
@ -154,8 +154,11 @@ class GuiAutoImport (threading.Thread):
|
||||||
else: # toggled off
|
else: # toggled off
|
||||||
self.doAutoImportBool = False # do_import will return this and stop the gobject callback timer
|
self.doAutoImportBool = False # do_import will return this and stop the gobject callback timer
|
||||||
print "Stopping autoimport"
|
print "Stopping autoimport"
|
||||||
print >>self.pipe_to_hud.stdin, "\n"
|
if self.pipe_to_hud.poll() is not None:
|
||||||
#self.pipe_to_hud.communicate('\n') # waits for process to terminate
|
print "HUD already terminated"
|
||||||
|
else:
|
||||||
|
#print >>self.pipe_to_hud.stdin, "\n"
|
||||||
|
self.pipe_to_hud.communicate('\n') # waits for process to terminate
|
||||||
self.pipe_to_hud = None
|
self.pipe_to_hud = None
|
||||||
self.startButton.set_label(u'Start Autoimport')
|
self.startButton.set_label(u'Start Autoimport')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user