parser: disable modules in update mode
authorDmitry Selyutin <ghostmansd@gmail.com>
Sat, 16 Sep 2017 19:33:12 +0000 (22:33 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 16 Sep 2017 19:33:12 +0000 (22:33 +0300)
pygnulib/parser.py

index e95fcce83e2b86e9a5a36bd7c155a198ac6fa52f..5038d65f54850ed71f6ded46c65ea7ae72c748be 100644 (file)
@@ -168,7 +168,8 @@ class CommandLine:
                     if old_mode != 0:
                         fmt = "argument {0}: not allowed with {1}"
                         parser.error(fmt.format(new_option, old_option))
-                    setattr(namespace, "modules", list(value))
+                    if new_mode != CommandLine._UPDATE_:
+                        setattr(namespace, "modules", list(value))
                     setattr(namespace, self.dest, new_mode)
             super().__call__(*args)