[Patch #1005491 ] use __name__ == '__main__' in scripts

This commit is contained in:
Andrew M. Kuchling 2004-08-09 17:27:55 +00:00
parent 6c542b731c
commit e236b38731
34 changed files with 257 additions and 200 deletions

View file

@ -160,7 +160,8 @@ def printresults(table):
# Call main and honor exit status
try:
sys.exit(main())
except KeyboardInterrupt:
sys.exit(1)
if __name__ == '__main__':
try:
sys.exit(main())
except KeyboardInterrupt:
sys.exit(1)