1. Takayuki Shimizukawa
  2. bucho

Commits

Takayuki Shimizukawa  committed 9e9d517

* fix meaningless argument for command:main function.
* add facade function command:console and use from entry_points.

  • Participants
  • Parent commits 0dd9165
  • Branches default

Comments (0)

Files changed (2)

File bucho/command.py

View file
     setattr(BuchoCmd, "do_" + name, makecmd(name))
 
 
-def main(args=None, options=None, cmdclass=BuchoCmd):
-    if args is None:
-        args = sys.argv[1:]
-
+def main(options=None, cmdclass=BuchoCmd):
     try:
         if options is None:
             options = BuchoOptions()
             pass
         c.cmdloop()
 
+def console():
+    main()
+
 if __name__ == '__main__':
     main()
 

File setup.py

View file
     license='PSL',
     entry_points = {
         'console_scripts': [
-            'bucho=bucho.command:main',
+            'bucho=bucho.command:console',
         ],
         'paste.app_factory': [
             'main=bucho.wsgi:app_factory',