]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
0021196: [CEA 456] Integration and merge modification for debian packages
authoreap <eap@opencascade.com>
Tue, 1 Mar 2011 12:11:41 +0000 (12:11 +0000)
committereap <eap@opencascade.com>
Tue, 1 Mar 2011 12:11:41 +0000 (12:11 +0000)
Use random instead of deprecated whrandom (gone as of python 2.5).

src/KERNEL_PY/batchmode_salome.py
src/KERNEL_PY/salome_study.py

index 9dea7faaf0524fef023e842cb2b5a3a381df310c..12c95bc1c76f0dd77fb3249a234c40452dcbe28c 100755 (executable)
@@ -53,8 +53,8 @@ def SalomeGUIgetAllSelected(self):
     #--------------------------------------------------------------------------
 
 def generateName(prefix = None):
-    import whrandom;
-    int = whrandom.randint(1,1000);
+    import random;
+    int = random.randint(1,1000);
     if prefix is None:
         return "Study" + str(int)
     else :
index 9cd9e8a44ab7d99c1d6a1d1a5b95a46f1a4f0997..9d1095f7da6fb40717bac1e0044bdd687304ea3b 100644 (file)
@@ -110,8 +110,8 @@ def IDToSObject(id):
     #--------------------------------------------------------------------------
 
 def generateName(prefix = None):
-    import whrandom;
-    int = whrandom.randint(1,1000);
+    import random;
+    int = random.randint(1,1000);
     if prefix is None:
         return "Study" + str(int)
     else :