]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
To print user friendly message at Python modules import error. SALOME_4_DOC
authorakl <akl@opencascade.com>
Tue, 23 Dec 2008 12:24:28 +0000 (12:24 +0000)
committerakl <akl@opencascade.com>
Tue, 23 Dec 2008 12:24:28 +0000 (12:24 +0000)
runInstall

index 497c7bd9362a8805025c190c89914cc7c6ce5d07..80a3ddd3eaa2abb0b7a1383929c4c64d0dde8f97 100755 (executable)
@@ -12,16 +12,21 @@ Copyright : 2002-2008 CEA
 
 __version__ = "1.1.5"
 
+# --- imports --- #
+import sys
+try:
+    import xml.sax, xml.dom.minidom
+    import os, re
+    import types
+    import random
+    import warnings
+except Exception, an_exc:
+    sys.exit("Error: %s! Please check the installed Python package." % str(an_exc))
+    pass
+
 # --- avoid "deprecation" warnings --- #
-import warnings
 warnings.filterwarnings("ignore", "", DeprecationWarning)
 
-# --- imports --- #
-import xml.sax, xml.dom.minidom
-import sys, os, re
-import types
-import random
-
 # --- global variables --- #
 opt_parser = None
 root_path  = None