[openrtm-commit:02207] r774 - trunk/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 1月 12日 (木) 17:15:08 JST


Author: miyamoto
Date: 2017-01-12 17:15:07 +0900 (Thu, 12 Jan 2017)
New Revision: 774

Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigurationListener.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigurationListener.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigurationListener.py	2017-01-11 10:09:04 UTC (rev 773)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ConfigurationListener.py	2017-01-12 08:15:07 UTC (rev 774)
@@ -444,7 +444,8 @@
   def __del__(self):
     for (idx, listener) in enumerate(self._listeners):
       if listener.autoclean:
-        self._listeners[idx] = None
+        del self._listeners[idx]
+        #self._listeners[idx] = None
     return
   
 
@@ -570,7 +571,8 @@
   def __del__(self):
     for (idx, listener) in enumerate(self._listeners):
       if listener.autoclean:
-        self._listeners[idx] = None
+        del self._listeners[idx]
+        #self._listeners[idx] = None
     return
     
 
@@ -696,7 +698,8 @@
   def __del__(self):
     for (idx, listener) in enumerate(self._listeners):
       if listener.autoclean:
-        self._listeners[idx] = None
+        del self._listeners[idx]
+        #self._listeners[idx] = None
     return
 
 

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py	2017-01-11 10:09:04 UTC (rev 773)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/CorbaNaming.py	2017-01-12 08:15:07 UTC (rev 774)
@@ -426,9 +426,9 @@
             context = obj_._narrow(CosNaming.NamingContext)
         else:
           raise CosNaming.NamingContext.CannotProceed(context, self.subName(name_list, i))
-    return
 
 
+
   ##
   # @if jp
   #
@@ -760,15 +760,14 @@
           next_context.destroy()
         elif bl[i].binding_type == CosNaming.nobject:
           context.unbind(bl[i].binding_name)
-        else:
-          assert(0)
+
       if CORBA.is_nil(bi):
         cont = False
       else:
-        bi.next_n(self._blLength, bl)
+        bi.next_n(self._blLength)
 
-    if not (CORBA.is_nil(bi)):
-      bi.destroy()
+    #if not (CORBA.is_nil(bi)):
+    #  bi.destroy()
     return
 
 
@@ -868,8 +867,8 @@
     nc_length = 0
     nc_length = self.split(string_name, "/", name_comps)
 
-    if not (nc_length > 0):
-      raise CosNaming.NamingContext.InvalidName
+    #if not (nc_length > 0):
+    #  raise CosNaming.NamingContext.InvalidName
 
     name_list = [CosNaming.NameComponent("","") for i in range(nc_length)]
 
@@ -1301,25 +1300,25 @@
     #obj = self.getRootContext()
     if CORBA.is_nil(obj):
         return []
-    nc = obj._narrow(obj)
-    if CORBA.is_nil(nc):
-      return []
+    #nc = obj._narrow(obj)
+    #if CORBA.is_nil(nc):
+    #  return []
     max_list_size = 65536
     
     bl, bi = obj.list(max_list_size)
     
     
     max_remaining = max_list_size - len(bl)
-    more_bindings = CORBA.is_nil(bi)
+    more_bindings = not CORBA.is_nil(bi)
     
     
-    if not more_bindings:
-      while not more_bindings and (max_remaining > 0):
+    if more_bindings:
+      while more_bindings and (max_remaining > 0):
         
         (tmp_bl, more_bindings) = bi.next_n(max_remaining)
         for i in tmp_bl:
           bl.append(i)
           
-          max_remaining = max_list_size - len(tmp_bl[0])
+        max_remaining = max_list_size - len(tmp_bl)
         
     return bl
\ No newline at end of file

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py	2017-01-11 10:09:04 UTC (rev 773)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/NamingManager.py	2017-01-12 08:15:07 UTC (rev 774)
@@ -860,8 +860,7 @@
     if mth == "corba":
       try:
         name = OpenRTM_aist.NamingOnCorba(self._manager.getORB(),name_server)
-        if name is None:
-          return None
+        
         self._rtcout.RTC_INFO("NameServer connection succeeded: %s/%s",
                               (method, name_server))
         return name

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py	2017-01-11 10:09:04 UTC (rev 773)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/OutPortBase.py	2017-01-12 08:15:07 UTC (rev 774)
@@ -1223,16 +1223,16 @@
         self._rtcout.RTC_ERROR("provider or consumer is not passed. returned 0;")
         return 0
 
-      if connector is None:
-        self._rtcout.RTC_ERROR("OutPortConnector creation failed")
-        return 0
+      #if connector is None:
+      #  self._rtcout.RTC_ERROR("OutPortConnector creation failed")
+      #  return 0
 
       if consumer_ is not None:
         self._rtcout.RTC_TRACE("OutPortPushConnector created")
       elif provider_ is not None:
         self._rtcout.RTC_TRACE("OutPortPullConnector created")
 
-            
+        
       if OpenRTM_aist.StringUtil.normalize([prop.getProperty("interface_type")]) == "direct":
         
         inport = self.getLocalInPort(profile)



More information about the openrtm-commit mailing list