[openrtm-commit:03109] r927 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 23日 (火) 13:13:33 JST
Author: miyamoto
Date: 2018-01-23 13:13:33 +0900 (Tue, 23 Jan 2018)
New Revision: 927
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
Log:
[compat, bugfix, ->RELENG_1_2] refs #4424
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py 2018-01-23 03:15:20 UTC (rev 926)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerConfig.py 2018-01-23 04:13:33 UTC (rev 927)
@@ -90,7 +90,7 @@
if sys.platform == 'win32':
config_file_path = ["./rtc.conf",
- "%RTM_ROOT%/bin/%RTM_VC_VERSION%/rtc.conf",
+ "${RTM_ROOT}bin/${RTM_VC_VERSION}/rtc.conf",
"C:/Python"+str(sys.version_info[0])+str(sys.version_info[1])+"/rtc.conf",
None]
else:
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py 2018-01-23 03:15:20 UTC (rev 926)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/StringUtil.py 2018-01-23 04:13:33 UTC (rev 927)
@@ -706,8 +706,8 @@
# @if jp
# @brief ʸ»úÎóÃæ¤Î´Ä¶ÊÑ¿ô¤òÃÖ¤´¹¤¨¤ë
#
-# ʸ»úÎóÃæ¤Ë%¤Ç°Ï¤Þ¤ì¤¿Ê¸»úÎ󤬤¢¤ë¾ì¹ç¤Ë¡¢´Ä¶ÊÑ¿ô¤ÈÃÖ¤´¹¤¨¤ë
-# Î㡧%RTM_ROOT%\bin -> C:\Program Files (x86)\OpenRTM-aist\1.1.2\
+# ʸ»úÎóÃæ¤Ë${}¤Ç°Ï¤Þ¤ì¤¿Ê¸»úÎ󤬤¢¤ë¾ì¹ç¤Ë¡¢´Ä¶ÊÑ¿ô¤ÈÃÖ¤´¹¤¨¤ë
+# Î㡧${RTM_ROOT}\bin -> C:\Program Files (x86)\OpenRTM-aist\1.1.2\
#
# @param _str ÃÖ¤´¹¤¨Á°¤Îʸ»úÎó
# @return ÃÖ¤´¹¤¨¸å¤Îʸ»úÎó
@@ -722,16 +722,19 @@
#
# @endif
def replaceEnv(_str):
- tmp = _str.split("%")
- if len(tmp) < 3:
+ tmp = _str.split("${")
+ if len(tmp) < 2:
return _str
ret = []
- for i in range(len(tmp)):
- if i%2 == 1:
- if tmp[i] in os.environ:
- ret.append(os.environ[tmp[i]])
+ for v in tmp:
+ tmp2 = v.split("}")
+ if len(tmp2) == 2:
+ if tmp2[0] in os.environ:
+ ret.append(os.environ[tmp2[0]])
+ ret.append(tmp2[1])
+
else:
- ret.append(tmp[i])
+ ret.append(v)
ret_str = ""
for s in ret:
ret_str = ret_str + s
More information about the openrtm-commit
mailing list