summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-04-14 11:46:15 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-04-14 11:46:15 -0700
commit9067814cbb2ce7e70bbfe51d4828691c9970ac89 (patch)
tree83e6fbd40b5d711f6bb41f23a93883955cf9a415
parent0db070487943ad43bed2122ab57283f8a479799d (diff)
downloadpystache-9067814cbb2ce7e70bbfe51d4828691c9970ac89.tar.gz
Made the argument to pystache.command.render's main() function optional.
-rw-r--r--pystache/commands/render.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pystache/commands/render.py b/pystache/commands/render.py
index e9fe490..cfe1652 100644
--- a/pystache/commands/render.py
+++ b/pystache/commands/render.py
@@ -54,7 +54,12 @@ def parse_args(sys_argv, usage):
return template, context
-def main(sys_argv):
+# TODO: verify whether the setup() method's entry_points argument
+# supports passing arguments to main:
+#
+# http://packages.python.org/distribute/setuptools.html#automatic-script-creation
+#
+def main(sys_argv=sys.argv):
template, context = parse_args(sys_argv, USAGE)
if template.endswith('.mustache'):
@@ -77,4 +82,4 @@ def main(sys_argv):
if __name__=='__main__':
- main(sys.argv)
+ main()