From 412f2de6b7a81dd023b92b3abead528b3c1dfd50 Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 24 May 2018 14:38:15 +0300 Subject: [PATCH] there is no need to explicitly pass sys.argv to argparse... embarrassing --- vdstatus | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vdstatus b/vdstatus index 0956e07..3636569 100755 --- a/vdstatus +++ b/vdstatus @@ -14,13 +14,13 @@ import plugins 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, ' 'and more. Warning: WIP, may be broken.') - p = argparse.ArgumentParser(description=desc) - p.add_argument('-c', '--conf', default=DEFAULT_CONFIG, - help='configuration file') - return p.parse_args(arguments) + parser = argparse.ArgumentParser(description=desc) + parser.add_argument('-c', '--conf', default=DEFAULT_CONFIG, + help='configuration file') + return parser.parse_args() class PluginRunner: