Commit c879f122 authored by Jens Jørgen Mortensen's avatar Jens Jørgen Mortensen

Merge branch 'fix-gpaw-python-command-extra-arguments' into 'master'

Fix supplying extra arguments to gpaw python

See merge request !606
parents 194fd824 23bc70c0
Pipeline #100283607 passed with stage
in 3 minutes and 36 seconds
......@@ -32,6 +32,7 @@ def hook(parser, args):
help='Run on N CPUs.')
args, extra = parser.parse_known_args(args)
if extra:
assert not args.arguments
args.arguments = extra
if args.command == 'python':
......
import argparse
import runpy
import sys
......@@ -19,7 +18,7 @@ class CLICommand:
parser.add_argument('arguments', metavar='ARG',
help='Arguments passed to program in '
'sys.argv[1:].',
nargs=argparse.REMAINDER)
nargs=-1)
@staticmethod
def run(args):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment