fixes osx bug where user couldn't change proxy or connect to network

by default osx passes a -psn arg when launching an app from command
line. this is a process serial number argument and py2app when used with
emulate_argv=True removes it.
commit d2097c15d9 removed this, thus
introducing the -psn arg on launch. this is misinterpreted by the arg
parser as a proxy setting, breaking networking.
This commit is contained in:
ptrcarta 2015-04-11 18:53:49 +02:00
parent 4fe32d2ad1
commit f6b6bbbbae
1 changed files with 4 additions and 0 deletions

View File

@ -189,6 +189,10 @@ def run_command(cmd, password=None, args=None):
if __name__ == '__main__':
#on osx, delete Process Serial Number arg generated for apps launched in Finder
if is_bundle == 'macosx_app' and sys.argv[1][:4] == '-psn':
del sys.argv[1]
wallet = None
parser = arg_parser()
options, args = parser.parse_args()