changeset 99:97e24e89388f

explicit main call.
author Edho Prima Arief <edho@myconan.net>
date Tue, 19 Jul 2011 15:43:02 +0700
parents 9be628347dce
children 06ab5f0f9c28
files bin/recompress
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/recompress	Thu Jul 14 01:11:18 2011 +0700
+++ b/bin/recompress	Tue Jul 19 15:43:02 2011 +0700
@@ -25,8 +25,8 @@
   import re
   return re.sub(r"[\x00-\x1F\x7F\n\r]", "?", filename)
 
-if __name__ == "__main__":
-  for filename in sys.argv[1:]:
+def main(files):
+  for filename in files:
     print "Recompressing %s:" % sane_fn(filename),
     sys.stdout.flush()
     try:
@@ -42,3 +42,5 @@
     finally:
       print "[%s]" % re
 
+if __name__ == "__main__":
+  main(sys.argv[1:])