Explorar o código

wxGUI: fix unsetting environmental variables (problem with 'system' locale in preferences)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55417 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=12) %!d(string=hai) anos
pai
achega
fa263acffa
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      gui/wxpython/core/utils.py

+ 3 - 2
gui/wxpython/core/utils.py

@@ -819,8 +819,9 @@ def StoreEnvVariable(key, value = None, envFile = None):
         fd.close()
     
     # update environmental variables
-    if value is None and key in environ:
-        del environ[key]
+    if value is None:
+        if key in environ:
+            del environ[key]
     else:
         environ[key] = value