Now exists cleanly on mpc close

This commit is contained in:
Uriziel 2012-09-22 14:47:05 +02:00
parent a3a9503467
commit bcef086b0e
2 changed files with 4 additions and 3 deletions

View File

@ -252,7 +252,7 @@ class SyncplayClientManager(object):
self.running = True
reactor.run()
def stop(self):
def stop(self, promptForAction = True):
if not self.running:
return
self.running = False
@ -263,7 +263,8 @@ class SyncplayClientManager(object):
if self.player:
self.player.drop()
reactor.callLater(0.1, reactor.stop)
self.ui.promptFor("Press enter to exit")
if(promptForAction):
self.ui.promptFor("Press enter to exit")
def checkIfFileMatchesOthers(self):
notMatchingList = self.users.getUsersWithNotMatchingFilenames()

View File

@ -154,7 +154,7 @@ class MPCHCAPIPlayer(object):
self.askLock.release()
def mpc_error(self, err=""):
self.__syncplayClient.stop()
self.__syncplayClient.stop(False)
sys.exit()
def run_mpc(manager, mpc_path, file_path, args):