From 189920111d28b8437c31405a290117d2c41f3efd Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 1 Mar 2011 12:42:10 +0000 Subject: [PATCH] 0021196: [CEA 456] Integration and merge modification for debian packages Use random instead of deprecated whrandom (gone as of python 2.5). --- src/KERNEL_PY/batchmode_salome.py | 4 ++-- src/KERNEL_PY/salome_study.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 : -- 2.39.2