Mercurial > getan
changeset 551:d44ee9cd7261
Overworked standard database transfer parameter
author | Magnus Schieder <mschieder@intevation.de> |
---|---|
date | Wed, 12 Feb 2020 13:10:44 +0100 |
parents | 28b1c18c900f |
children | a59e318c3f72 8b92ed4e40d8 |
files | getan/main.py scripts/getan-report |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/main.py Tue Feb 11 15:46:37 2020 +0100 +++ b/getan/main.py Wed Feb 12 13:10:44 2020 +0100 @@ -52,8 +52,7 @@ parser.add_argument('--version', action='version', version=textwrap.dedent(version)) parser.add_argument(dest='filename', nargs='?', - help='[databasefile (default: ~/.getan/%(default)s)]', - default=DEFAULT_DATABASE) + help='databasefile (default: ~/.getan/' + DEFAULT_DATABASE + ')') parser.add_argument('--init-only', action='store_true', dest='initonly', help='create databasefile if necessary and exit') parser.add_argument('-d', '--debug', action='store_const', dest='loglevel', @@ -68,7 +67,7 @@ config.initialize(args.loglevel, args.logfile) global logger - if args.filename != DEFAULT_DATABASE: + if args.filename: database = args.filename else: if os.path.isfile(DEFAULT_DATABASE):
--- a/scripts/getan-report Tue Feb 11 15:46:37 2020 +0100 +++ b/scripts/getan-report Wed Feb 12 13:10:44 2020 +0100 @@ -27,8 +27,7 @@ description="You can find more information at https://pypi.org/project/getan/") parser.add_argument('-d', '--database', metavar="DATABASE_FILE", - help='(default: ~/.getan/%(default)s)]', - default=DEFAULT_DATABASE) + help='(default: ~/.getan/'+ DEFAULT_DATABASE + ")") parser.add_argument('-t', '--template', help="""name of getan template (wochenbericht, zeiterfassung, zeiterfassung2),