]> 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:42:10 +0000 (12:42 +0000)
committereap <eap@opencascade.com>
Tue, 1 Mar 2011 12:42:10 +0000 (12:42 +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 00676ffbc254ce97f233719eaf48a2aabc15293c..6f53d38bbe528f00d54dc23ccc90bc0c5a796d1b 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 :