]> khamidou — GitHub mirrors - pycco.git/commitdiff
Fixing argv parameter parsing
authorNick Fitzgerald <fitzgen@gmail.com>
Wed, 30 Jun 2010 02:49:49 +0000 (19:49 -0700)
committerNick Fitzgerald <fitzgen@gmail.com>
Wed, 30 Jun 2010 02:49:49 +0000 (19:49 -0700)
bin/pocco
pocco.py

index 61531a42ba234f3a9d4f2011e5011dadef668923..884d538d60cce57157972ceef52e31ac3f90847e 100755 (executable)
--- a/bin/pocco
+++ b/bin/pocco
@@ -4,6 +4,7 @@ import os
 import sys
 
 lib = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
-cmd = 'python ' + os.path.join(lib, 'pocco.py') + " ".join(sys.argv[2:])
+cmd = "python %s %s" % (os.path.join(lib, 'pocco.py'),
+                        " ".join(sys.argv[1:]))
 
 print os.popen(cmd).read(),
index 18065dbec973b670207b619701b4a373e3ccbce5..559e38b4be5469165cb819896af94c52f9f21a25 100644 (file)
--- a/pocco.py
+++ b/pocco.py
@@ -174,7 +174,7 @@ highlight_end = "</pre></div>"
 # Run the script.
 # For each source file passed in as an argument, generate the documentation.
 if __name__ == "__main__":
-    sources = list(sys.argv)
+    sources = list(sys.argv[1:])
     sources.sort()
     if sources:
         ensure_directory()