Minor refactoring

This commit is contained in:
Miroslav Stampar
2016-08-08 16:08:16 +02:00
parent 6ba46bf7cf
commit ec1ac81e0a
4 changed files with 18 additions and 18 deletions

View File

@@ -300,7 +300,7 @@ def main():
if hasattr(conf, "api"):
try:
conf.database_cursor.disconnect()
conf.databaseCursor.disconnect()
except KeyboardInterrupt:
pass
@@ -314,10 +314,10 @@ def main():
time.sleep(0.01)
except KeyboardInterrupt:
pass
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
if threading.activeCount() > 1:
os._exit(0)
finally:
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
if threading.activeCount() > 1:
os._exit(0)
if __name__ == "__main__":
main()