# HG changeset patch # User Denis Laxalde # Date 1516797050 -3600 # Node ID 9165f4b7426b55d43b71a936da8638d96e47ddf5 # Parent 64c4edac1706924514bf452eaa43ed8d202e5fa2 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. diff -r 64c4edac1706 -r 9165f4b7426b bin/cubicweb-ctl --- 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() diff -r 64c4edac1706 -r 9165f4b7426b cubicweb/__main__.py --- 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() diff -r 64c4edac1706 -r 9165f4b7426b cubicweb/cwctl.py --- 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()