Commit c1eeb7b2 authored by Guillaume Seguin's avatar Guillaume Seguin

Workaround for OS X: drop -psn* arguments before parsing args

OS X adds this "process serial number" argument automatically when launching an
App or similar situations. We don't care about this argument and drop it before
parsing the args using argparse.
parent 02b2fb63
......@@ -1221,7 +1221,8 @@ class pronsole(cmd.Cmd):
def parse_cmdline(self, args):
parser = argparse.ArgumentParser(description = 'Printrun 3D printer interface')
self.add_cmdline_arguments(parser)
args = parser.parse_args()
args = [arg for arg in args if not arg.startswith("-psn")]
args = parser.parse_args(args = args)
self.process_cmdline_arguments(args)
# We replace this function, defined in cmd.py .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment