diff options
author | Johannes Gijsbers <jlg@dds.nl> | 2004-09-11 16:34:35 (GMT) |
---|---|---|
committer | Johannes Gijsbers <jlg@dds.nl> | 2004-09-11 16:34:35 (GMT) |
commit | 7a8c43ee6a1f9c50bec8cc5234eff8b1d5e61088 (patch) | |
tree | eaff8edea3793ee407b424b9096c443b9a0d06ec /Demo/scripts/lpwatch.py | |
parent | 9324526a7658c5450eba24b48065d87d5db5ab1f (diff) | |
download | cpython-7a8c43ee6a1f9c50bec8cc5234eff8b1d5e61088.zip cpython-7a8c43ee6a1f9c50bec8cc5234eff8b1d5e61088.tar.gz cpython-7a8c43ee6a1f9c50bec8cc5234eff8b1d5e61088.tar.bz2 |
Add 'if __name__ == "__main__":' to files already as a usable as a module.
Diffstat (limited to 'Demo/scripts/lpwatch.py')
-rwxr-xr-x | Demo/scripts/lpwatch.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Demo/scripts/lpwatch.py b/Demo/scripts/lpwatch.py index 0af3cbd..8887dee 100755 --- a/Demo/scripts/lpwatch.py +++ b/Demo/scripts/lpwatch.py @@ -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 |