there is no need to explicitly pass sys.argv to argparse... embarrassing
This commit is contained in:
parent
9cd7b68967
commit
412f2de6b7
1 changed files with 5 additions and 5 deletions
10
vdstatus
10
vdstatus
|
@ -14,13 +14,13 @@ import plugins
|
||||||
DEFAULT_CONFIG = os.path.join(os.environ['HOME'], '.config/vdstatus/conf.json')
|
DEFAULT_CONFIG = os.path.join(os.environ['HOME'], '.config/vdstatus/conf.json')
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments(arguments=sys.argv[1:]):
|
def parse_arguments():
|
||||||
desc = ('A simple i3status replacement, '
|
desc = ('A simple i3status replacement, '
|
||||||
'and more. Warning: WIP, may be broken.')
|
'and more. Warning: WIP, may be broken.')
|
||||||
p = argparse.ArgumentParser(description=desc)
|
parser = argparse.ArgumentParser(description=desc)
|
||||||
p.add_argument('-c', '--conf', default=DEFAULT_CONFIG,
|
parser.add_argument('-c', '--conf', default=DEFAULT_CONFIG,
|
||||||
help='configuration file')
|
help='configuration file')
|
||||||
return p.parse_args(arguments)
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
class PluginRunner:
|
class PluginRunner:
|
||||||
|
|
Loading…
Reference in a new issue