Add default argument to loadOptions().
Fixes https://github.com/jensengroup/propka-3.1/issues/46
This commit is contained in:
@@ -222,7 +222,7 @@ def build_parser(parser=None):
|
|||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
def loadOptions(args):
|
def loadOptions(args=None):
|
||||||
"""
|
"""
|
||||||
Load the arguments parser with options. Note that verbosity is set as soon
|
Load the arguments parser with options. Note that verbosity is set as soon
|
||||||
as this function is invoked.
|
as this function is invoked.
|
||||||
@@ -232,9 +232,8 @@ def loadOptions(args):
|
|||||||
Returns:
|
Returns:
|
||||||
argparse namespace
|
argparse namespace
|
||||||
"""
|
"""
|
||||||
# defining a 'usage' message
|
if args == None:
|
||||||
usage = "usage: %prog [options] filename"
|
args = []
|
||||||
|
|
||||||
# loading the parser
|
# loading the parser
|
||||||
parser = build_parser()
|
parser = build_parser()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user