From: eap Date: Tue, 1 Mar 2011 12:42:10 +0000 (+0000) Subject: 0021196: [CEA 456] Integration and merge modification for debian packages X-Git-Tag: Start_BR_19998_21191~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=189920111d28b8437c31405a290117d2c41f3efd;p=modules%2Fkernel.git 0021196: [CEA 456] Integration and merge modification for debian packages Use random instead of deprecated whrandom (gone as of python 2.5). --- diff --git a/src/KERNEL_PY/batchmode_salome.py b/src/KERNEL_PY/batchmode_salome.py index 9dea7faaf..12c95bc1c 100755 --- a/src/KERNEL_PY/batchmode_salome.py +++ b/src/KERNEL_PY/batchmode_salome.py @@ -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 : diff --git a/src/KERNEL_PY/salome_study.py b/src/KERNEL_PY/salome_study.py index 00676ffbc..6f53d38bb 100644 --- a/src/KERNEL_PY/salome_study.py +++ b/src/KERNEL_PY/salome_study.py @@ -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 :