Set a default value for arguments of cubicweb.cwctl:run()
This will help making a console script entry point from this to get rid
of the custom installation of scripts in setup.py.
Accordingly, update all calls of this function.
--- a/bin/cubicweb-ctl Wed Jan 24 11:34:44 2018 +0100
+++ b/bin/cubicweb-ctl Wed Jan 24 13:30:50 2018 +0100
@@ -1,4 +1,3 @@
#!/usr/bin/env python
from cubicweb.cwctl import run
-import sys
-run(sys.argv[1:])
+run()
--- a/cubicweb/__main__.py Wed Jan 24 11:34:44 2018 +0100
+++ b/cubicweb/__main__.py Wed Jan 24 13:30:50 2018 +0100
@@ -1,4 +1,3 @@
from cubicweb.cwctl import run
-import sys
-run(sys.argv[1:])
+run()
--- a/cubicweb/cwctl.py Wed Jan 24 11:34:44 2018 +0100
+++ b/cubicweb/cwctl.py Wed Jan 24 13:30:50 2018 +0100
@@ -1078,7 +1078,7 @@
-def run(args):
+def run(args=sys.argv[1:]):
"""command line tool"""
import os
filterwarnings('default', category=DeprecationWarning)
@@ -1093,4 +1093,4 @@
sys.exit(2)
if __name__ == '__main__':
- run(sys.argv[1:])
+ run()