mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Add 'if __name__ == "__main__":' to files already as a usable as a module.
This commit is contained in:
parent
9324526a76
commit
7a8c43ee6a
13 changed files with 29 additions and 18 deletions
|
|
@ -103,7 +103,8 @@ def makestatus(name, thisuser):
|
|||
lines.append('lpq exit status %r' % (sts,))
|
||||
return string.joinfields(lines, ': ')
|
||||
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue