Fix call os lyx2lyx as a module.

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.
This commit is contained in:
José Matos 2017-05-13 13:39:02 +01:00
parent 6138880c08
commit 99cf71f8eb

View File

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