]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Correct bug on assign on RdWr Glob var.
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 13 Aug 2015 15:15:42 +0000 (17:15 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 13 Aug 2015 15:15:42 +0000 (17:15 +0200)
src/SALOMESDS/SalomeSDSClt.py
src/SALOMESDS/TestSalomeSDS.py

index 47a5acb3f76b9f786e4e9d8c34492d62aeb99aa6..71216f8528ae27af7e3106506aba2d6dfc196b5c 100644 (file)
@@ -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):
index bd333ca39995c5c1e4e0a8af8be9efd62c81d4a3..76ef0dd74182786ecdf1eb61b6f51408cb1c584b 100644 (file)
@@ -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)