Bläddra i källkod

Fix WXGUI startup on non-NLS systems accidentaly broken by me :(

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52582 15284696-431f-4ddb-bdfa-cd5b030d7da7
Maris Nartiss 12 år sedan
förälder
incheckning
bc480194f7
1 ändrade filer med 8 tillägg och 4 borttagningar
  1. 8 4
      gui/wxpython/core/settings.py

+ 8 - 4
gui/wxpython/core/settings.py

@@ -56,10 +56,14 @@ class Settings:
         """
         import os
         
-        self.locs = os.listdir(os.path.join(os.environ['GISBASE'], 'locale'))
-        self.locs.sort()
-        # Add a default choice to not override system locale
-        self.locs.insert(0, 'system')
+        try:
+            self.locs = os.listdir(os.path.join(os.environ['GISBASE'], 'locale'))
+            self.locs.sort()
+            # Add a default choice to not override system locale
+            self.locs.insert(0, 'system')
+        except:
+            # No NLS
+            self.locs = ['system']
         
         return 'system'