client/bootloader: Handle case when sys.argv is missing

This commit is contained in:
Oleksii Shevchuk 2019-05-07 23:20:02 +03:00
parent 4a3ed2fe8a
commit 7a6eb431eb
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ if __name__ == "__main__":
bootloader = [
remove_stdout if not args.debug else 'print "DEBUG"\n',
'import sys; sys.path=[]; sys.path_hooks=[]; sys.meta_path=[]; '
'sys.real_argv=sys.argv;' + (
'sys.real_argv=getattr(sys, "argv", []);' + (
'sys.argv = [];' if not args.pass_argv else ''
) + 'sys.prefix = "";\n',
pupyload.format('pupyimporter', repr(pupyimporter)),