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