aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-18 16:37:45 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-18 16:37:45 +0200
commit02ac586e926ac24fa706b84a495e14c8980eb934 (patch)
tree6f8a2c89fe7a97ade7f22cf84975cc76a479014a /src
parentm (diff)
downloadargparser-02ac586e926ac24fa706b84a495e14c8980eb934.tar.gz
argparser-02ac586e926ac24fa706b84a495e14c8980eb934.tar.bz2
argparser-02ac586e926ac24fa706b84a495e14c8980eb934.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/argparser.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/argparser.py b/src/argparser.py
index d3d84e6..b58f89f 100644
--- a/src/argparser.py
+++ b/src/argparser.py
@@ -289,11 +289,10 @@ class ArgParser():
if arg[0] == ArgParser.VARIADIC:
varopt = self.opts[arg[1][4]]
if varopt is not None:
- additional = self.files if len(self.files) > 0 else []
if varopt[0] is None:
- self.opts[arg[1][4]] = additional
+ self.opts[arg[1][4]] = self.files
else:
- self.opts[arg[1][4]] = varopt + additional
+ self.opts[arg[1][4]] = varopt + self.files
self.files = []
break