mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
[Patch #1005491 ] use __name__ == '__main__' in scripts
This commit is contained in:
parent
6c542b731c
commit
e236b38731
34 changed files with 257 additions and 200 deletions
|
@ -177,8 +177,9 @@ def format_output(database):
|
|||
prev.append((date, working_file, rev, author))
|
||||
prevtext = text
|
||||
|
||||
try:
|
||||
main()
|
||||
except IOError, e:
|
||||
if e.errno != errno.EPIPE:
|
||||
raise
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except IOError, e:
|
||||
if e.errno != errno.EPIPE:
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue