浏览代码

grass.py: cache exception when closing GUI fails

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67501 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 年之前
父节点
当前提交
90af508ea6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lib/init/grass.py

+ 4 - 1
lib/init/grass.py

@@ -1361,7 +1361,10 @@ def close_gui():
     import signal
     for pid in env['GUI_PID'].split(','):
         debug("Exiting GUI with pid={}".format(pid))
-        os.kill(int(pid), signal.SIGTERM)
+        try:
+            os.kill(int(pid), signal.SIGTERM)
+        except OSError as e:
+            message(_("Unable to close GUI. {}".format(e)))
         
 def clear_screen():
     """Clear terminal"""