Salome HOME
Merge tag 'V8_3_0a2' into ngr/python3_dev
[modules/kernel.git] / src / KERNEL_PY / kernel / uiexception.py
index 2999c32c0c480fb098128e46e61c75b35a80fb00..bb1928e49945453f648ea72bd41e0a3c4d26f008 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,7 +26,7 @@
 __author__="gboulant"
 __date__ ="$31 mars 2010 11:59:33$"
 
-from enumerate import Enumerate
+from .enumerate import Enumerate
 
 ## This exception should be used for functionnal error management, at least in the GUI
 #  part of the application, for example to set user oriented messages at point
@@ -101,21 +101,21 @@ def TEST_uimessage():
     try:
         somethingGoesWrong()
         return False
-    except UiException, err:
-        print 'ERROR: %s' % str(err)
+    except UiException as err:
+        print('ERROR: %s' % str(err))
         if ( str(err) == "Something goes wrong" ):
             return True
         else:
             return False
 
 def TEST_specificException():
-    print DevelException("err")
-    print AdminException("err")
-    print UserException("err")
+    print(DevelException("err"))
+    print(AdminException("err"))
+    print(UserException("err"))
     return True
 
 if __name__ == "__main__":
-    import unittester
+    from . import unittester
     unittester.run("uiexception","TEST_uimessage")
     unittester.run("uiexception","TEST_specificException")