diff options
Diffstat (limited to 'src/peerinfo-tool/test_gnunet_peerinfo.py.in')
-rwxr-xr-x | src/peerinfo-tool/test_gnunet_peerinfo.py.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/peerinfo-tool/test_gnunet_peerinfo.py.in b/src/peerinfo-tool/test_gnunet_peerinfo.py.in index 9d6fd8fb2..709556f70 100755 --- a/src/peerinfo-tool/test_gnunet_peerinfo.py.in +++ b/src/peerinfo-tool/test_gnunet_peerinfo.py.in | |||
@@ -33,7 +33,7 @@ if gnunet_pyexpect_dir not in sys.path: | |||
33 | from gnunet_pyexpect import pexpect | 33 | from gnunet_pyexpect import pexpect |
34 | 34 | ||
35 | #save LANG and set it to C | 35 | #save LANG and set it to C |
36 | mylang = os.environ['LANG'] | 36 | mylang = os.environ.get('LANG') |
37 | os.environ['LANG'] = 'C' | 37 | os.environ['LANG'] = 'C' |
38 | 38 | ||
39 | if os.name == 'posix': | 39 | if os.name == 'posix': |
@@ -139,4 +139,5 @@ finally: | |||
139 | else: | 139 | else: |
140 | shutil.rmtree("/tmp/gnunet-test-peerinfo", True) | 140 | shutil.rmtree("/tmp/gnunet-test-peerinfo", True) |
141 | #Reset LANG | 141 | #Reset LANG |
142 | os.environ['LANG'] = mylang | 142 | if type(mylang) == str: |
143 | os.environ['LANG'] = mylang | ||