minor optimization and refactoring

This commit is contained in:
Miroslav Stampar
2011-07-25 20:17:44 +00:00
parent 0a7a648694
commit 5770c08784
5 changed files with 19 additions and 20 deletions

View File

@@ -130,7 +130,8 @@ def main():
kb.threadException = True
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
os._exit(0)
if conf.threads > 1:
os._exit(0)
if __name__ == "__main__":
main()