mirror of https://github.com/tLDP/python-tldp
create variable DEFAULT_CONFIGFILE
so that at runtime (during testing), it can be overridden
This commit is contained in:
parent
8a99c39d93
commit
7bd32896eb
|
@ -12,6 +12,7 @@ import tldp.typeguesser
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
DEFAULT_CONFIGFILE = '/etc/ldptool/ldptool.ini'
|
||||||
|
|
||||||
def collectconfiguration(tag, argv):
|
def collectconfiguration(tag, argv):
|
||||||
ap = DefaultFreeArgumentParser()
|
ap = DefaultFreeArgumentParser()
|
||||||
|
@ -72,7 +73,7 @@ def collectconfiguration(tag, argv):
|
||||||
help='a scratch directory used for building')
|
help='a scratch directory used for building')
|
||||||
ap.add_argument('--configfile', '--config-file', '--cfg',
|
ap.add_argument('--configfile', '--config-file', '--cfg',
|
||||||
'-c',
|
'-c',
|
||||||
default='/etc/ldptool/ldptool.ini',
|
default=DEFAULT_CONFIGFILE,
|
||||||
type=arg_isreadablefile,
|
type=arg_isreadablefile,
|
||||||
help='a configuration file')
|
help='a configuration file')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue