mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
platform: syntax compatibility with antiquated Python versions for environment loader
This commit is contained in:
+4
-1
@@ -9,6 +9,9 @@ import sys
|
||||
if len(sys.argv) != 2:
|
||||
raise Error('Exactly one argument expected')
|
||||
|
||||
with open(sys.argv[1], 'w') as f:
|
||||
f = open(sys.argv[1], 'w')
|
||||
try:
|
||||
for key, value in os.environ.items():
|
||||
f.writelines([key, '=', value, '\0'])
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user