c47144e1fe4b

Move the main functionality into a _main() function.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 26 Aug 2009 18:10:01 -0400
parents 61803d906c96
children b92ebe6d7e77
branches/tags (none)
files t.py

Changes

--- a/t.py	Wed Aug 26 18:08:45 2009 -0400
+++ b/t.py	Wed Aug 26 18:10:01 2009 -0400
@@ -157,8 +157,7 @@
                       help="print more detailed output (full task ids, etc)")
     return parser
 
-
-if __name__ == '__main__':
+def _main():
     (options, args) = build_parser().parse_args()
     
     td = TaskDict(taskdir=options.taskdir, name=options.name)
@@ -176,3 +175,6 @@
     else:
         td.print_list(verbose=options.verbose)
 
+
+if __name__ == '__main__':
+    _main()