From: Anthony Geay Date: Thu, 13 Aug 2015 15:15:42 +0000 (+0200) Subject: Correct bug on assign on RdWr Glob var. X-Git-Tag: V7_7_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d830aeae66d08499bcffe0521e6e2f2cdc0c2394;p=modules%2Fkernel.git Correct bug on assign on RdWr Glob var. --- diff --git a/src/SALOMESDS/SalomeSDSClt.py b/src/SALOMESDS/SalomeSDSClt.py index 47a5acb3f..71216f852 100644 --- a/src/SALOMESDS/SalomeSDSClt.py +++ b/src/SALOMESDS/SalomeSDSClt.py @@ -89,9 +89,10 @@ class WrappedType(SALOMEWrappedStdType.WrappedType): return (self._wrapped_type,(self.local_copy(),)) def assign(self,elt): - assert(isinstance(self._var_ptr,SALOME._objref_PickelizedPyObjRdWrServer)) + ptrCorba=self._var_ptr.ptr() + assert(isinstance(ptrCorba,SALOME._objref_PickelizedPyObjRdWrServer)) st=cPickle.dumps(elt,cPickle.HIGHEST_PROTOCOL) - self._var_ptr.setSerializedContent(st) + ptrCorba.setSerializedContent(st) pass def __del__(self): diff --git a/src/SALOMESDS/TestSalomeSDS.py b/src/SALOMESDS/TestSalomeSDS.py index bd333ca39..76ef0dd74 100644 --- a/src/SALOMESDS/TestSalomeSDS.py +++ b/src/SALOMESDS/TestSalomeSDS.py @@ -248,6 +248,9 @@ class SalomeSDSTest(unittest.TestCase): # play a["ab"]=4 self.assertEqual(a.local_copy(),{"ab":4}) + a.assign({"ab":5}) + self.assertEqual(a.local_copy(),{"ab":5}) + a.assign({"ab":4}) a["cd"]=[5] self.assertEqual(a.local_copy(),{"ab":4,"cd":[5]}) a["cd"].append(77)