]> git.lyx.org Git - features.git/commitdiff
Fix call os lyx2lyx as a module.
authorJosé Matos <jamatos@lyx.org>
Sat, 13 May 2017 12:39:02 +0000 (13:39 +0100)
committerJosé Matos <jamatos@lyx.org>
Sat, 13 May 2017 12:39:02 +0000 (13:39 +0100)
If we call parser.parse_args(), thus with no arguments, the parser uses
sys.argv (because that is the default). We should pass argv since that was
the purpose of handling argv in the main function.

lib/scripts/layout2layout.py

index f16aba0cbb5633dcf48a15633e05c68c076f3348..0633c81174cbdfe359e25d03cf1abc180653474d 100644 (file)
@@ -1179,7 +1179,7 @@ def main(argv):
     parser.add_argument("output_file", nargs='?', type=cmd_arg, default=None,
                         help="output file (default stdout)")
 
-    options = parser.parse_args()
+    options = parser.parse_args(argv)
 
     # Open files
     if options.input_file: