Kaynağa Gözat

init: end immediately when GUI not available

When GUI to select the Location and Mapset is not available (usually because of missing wxPython),
end execution right away instead of trying the text mode. The text mode was not starting anyway when
GRASS was just compiled. When GRASS was installed, it got into a loop with 'Hit RETURN to continue'
(for unknown reasons). User anyway had not specified the Mapset, so there is no point in selecting
the last one used.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65849 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 yıl önce
ebeveyn
işleme
27b99e9369
1 değiştirilmiş dosya ile 5 ekleme ve 10 silme
  1. 5 10
      lib/init/grass.py

+ 5 - 10
lib/init/grass.py

@@ -944,16 +944,11 @@ def gui_startup(grass_gui):
     if ret == 0:
         pass
     elif ret == 1:
-        # The startup script printed an error message so wait
-        # for user to read it
-        message(_("Error in GUI startup. If necessary, please "
-                  "report this error to the GRASS developers.\n"
-                  "Switching to text mode now.\n\n"
-                  "Hit RETURN to continue..."))
-        sys.stdin.readline()
-
-        os.execlp(cmd_name, "-text")
-        sys.exit(1)
+        # formerly we were starting in text mode instead, now we just fail
+        # which is more straightforward for everybody
+        fatal(_("Error in GUI startup. If necessary, please "
+                "report this error to the GRASS developers.\n"
+                "To run GRASS GIS in text mode use -text parameter."))
     elif ret == 2:
         # User wants to exit from GRASS
         message(_("Received EXIT message from GUI.\nGRASS is not started. Bye."))