[openrtm-commit:03381] r1040 - branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2018年 11月 21日 (水) 14:07:09 JST


Author: miyamoto
Date: 2018-11-21 14:07:08 +0900 (Wed, 21 Nov 2018)
New Revision: 1040

Modified:
   branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
   branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
Log:
[merge] r1039 has been merged from trunk.

Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/Manager.py	2018-11-21 05:05:36 UTC (rev 1039)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/Manager.py	2018-11-21 05:07:08 UTC (rev 1040)
@@ -3365,12 +3365,16 @@
     def __init__(self, name=None, factory=None, prop=None):
       if prop:
         self._name = prop.getProperty("instance_name")
-      if factory:
+      elif factory:
         self._name = factory.getInstanceName()
       elif name:
         self._name = name
+      else:
+        self._name = ""
 
     def __call__(self, comp):
+      if not self._name:
+        return False
       return self._name == comp.getInstanceName()
 
 

Modified: branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py	2018-11-21 05:05:36 UTC (rev 1039)
+++ branches/RELENG_1_2/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py	2018-11-21 05:07:08 UTC (rev 1040)
@@ -797,8 +797,8 @@
     dirs = glob.glob(os.path.join(dir,"*"))
     for d in dirs:
         if os.path.isdir(d):
-            getFileList(d, ext, filelist)
+          getFileList(d, ext, filelist)
     files = glob.glob(os.path.join(dir,"*."+ext))
     for f in files:
-        if os.path.isfile(d):
-            filelist.append(f)
\ No newline at end of file
+        if os.path.isfile(f):
+          filelist.append(f)
\ No newline at end of file



openrtm-commit メーリングリストの案内