[platform] fixes shell environment loading under Python 3 (IDEA-192345)

This commit is contained in:
Roman Shevchenko
2018-05-22 15:58:19 +03:00
parent 22308b37c8
commit 0a3fbe1241
+2
View File
@@ -12,6 +12,8 @@ if len(sys.argv) != 2:
f = open(sys.argv[1], 'w')
try:
for key, value in os.environ.items():
if isinstance(key, unicode): key = key.encode('utf-8')
if isinstance(value, unicode): value = value.encode('utf-8')
f.writelines([key, '=', value, '\0'])
finally:
f.close()