瀏覽代碼

attempt to fix trac https://trac.osgeo.org/grass/ticket/472
(merge from relbr64, https://trac.osgeo.org/grass/changeset/35715)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@35717 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 年之前
父節點
當前提交
332a8b8135
共有 1 個文件被更改,包括 7 次插入6 次删除
  1. 7 6
      gui/wxpython/gui_modules/profile.py

+ 7 - 6
gui/wxpython/gui_modules/profile.py

@@ -28,14 +28,15 @@ import wx
 import wx.lib.colourselect as  csel
 
 try:
+    import numpy
     import wx.lib.plot as plot
-except:
+except ImportError:
     msg= """
-    This module requires the NumPy module,
-    which could not be imported.  It probably is not installed
-    (it's not part of the standard Python distribution). See the
-    Numeric Python site (http://numpy.scipy.org) for information on
-    downloading source or binaries."""
+    This module requires the NumPy module, which could not be
+    imported. It probably is not installed (it's not part of the
+    standard Python distribution). See the Numeric Python site
+    (http://numpy.scipy.org) for information on downloading source or
+    binaries."""
     print >> sys.stderr, "profile.py: " + msg
 
 import globalvar