From: eap Date: Tue, 1 Mar 2011 12:11:41 +0000 (+0000) Subject: 0021196: [CEA 456] Integration and merge modification for debian packages X-Git-Tag: V5_1_main_FINAL~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2c6543ee2556f48482852e1675755dffda124afa;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 9cd9e8a44..9d1095f7d 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 :