From 31a78432bbbea732ced3677eff9019ed7da0a941 Mon Sep 17 00:00:00 2001 From: Nyo Date: Sun, 4 Sep 2016 12:42:14 +0200 Subject: [PATCH] .BANCHO. .FIX. Stop spectating only if user is spectating someone --- objects/osuToken.py | 2 ++ pep.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/objects/osuToken.py b/objects/osuToken.py index 1ce5a27..4bd14e7 100644 --- a/objects/osuToken.py +++ b/objects/osuToken.py @@ -146,6 +146,8 @@ class token: def stopSpectating(self): # Remove our userID from host's spectators target = self.spectating + if self.spectating == 0: + return targetToken = glob.tokens.getTokenFromUserID(target) if targetToken is not None: # Remove us from host's spectators list diff --git a/pep.py b/pep.py index f9ba43e..19dedd0 100644 --- a/pep.py +++ b/pep.py @@ -82,9 +82,6 @@ if __name__ == "__main__": os.makedirs(i, 0o770) consoleHelper.printDone() - # Flush file buffers at exit - #atexit.register(lambda: glob.fileBuffers.flushAll()) - # Connect to db try: consoleHelper.printNoNl("> Connecting to MySQL db")