[openrtm-commit:02182] r768 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 12月 19日 (月) 16:01:27 JST
Author: miyamoto
Date: 2016-12-19 16:01:27 +0900 (Mon, 19 Dec 2016)
New Revision: 768
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoConfiguration.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoOrganization.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/Timer.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug. refs #3760
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py 2016-12-06 01:44:18 UTC (rev 767)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py 2016-12-19 07:01:27 UTC (rev 768)
@@ -653,7 +653,7 @@
for ec in self._ecOther:
if not CORBA.is_nil(ec):
# ec.stop()
- ret = ec.remove_component(self._this())
+ ec.remove_component(self._this())
self._exiting = True
@@ -922,7 +922,7 @@
except:
self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- assert(False)
+
return None
@@ -949,16 +949,13 @@
# virtual PortServiceList* get_ports()
def get_ports(self):
self._rtcout.RTC_TRACE("get_ports()")
- try:
- return self._portAdmin.getPortServiceList()
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- assert(False)
- return []
+ return self._portAdmin.getPortServiceList()
+
+
# RTC::ComponentAction
##
@@ -1718,15 +1715,11 @@
# virtual SDOPackage::OrganizationList* get_owned_organizations()
def get_owned_organizations(self):
self._rtcout.RTC_TRACE("get_owned_organizations()")
- try:
- return self._sdoOwnedOrganizations
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.NotAvailable("NotAvailable: get_owned_organizations")
- return []
+ return self._sdoOwnedOrganizations
+
#============================================================
# SDOPackage::SDO
#============================================================
@@ -1769,13 +1762,11 @@
# virtual char* get_sdo_id()
def get_sdo_id(self):
self._rtcout.RTC_TRACE("get_sdo_id()")
- try:
- return self._profile.instance_name
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_sdo_id()")
+ return self._profile.instance_name
+
+
##
# @if jp
#
@@ -1814,14 +1805,11 @@
# virtual char* get_sdo_type()
def get_sdo_type(self):
self._rtcout.RTC_TRACE("get_sdo_type()")
- try:
- return self._profile.description
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_sdo_type()")
- return ""
+ return self._profile.description
+
+
##
# @if jp
#
@@ -1863,15 +1851,11 @@
# virtual SDOPackage::DeviceProfile* get_device_profile()
def get_device_profile(self):
self._rtcout.RTC_TRACE("get_device_profile()")
- try:
- return self._SdoConfigImpl.getDeviceProfile()
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_device_profile()")
- return SDOPackage.DeviceProfile("","","","",[])
+ return self._SdoConfigImpl.getDeviceProfile()
+
##
# @if jp
#
@@ -1914,12 +1898,9 @@
def get_service_profiles(self):
self._rtcout.RTC_TRACE("get_service_profiles()")
self._sdoSvcProfiles = self._SdoConfigImpl.getServiceProfiles()
- try:
- return self._sdoSvcProfiles
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_service_profiles()")
+ return self._sdoSvcProfiles
+
@@ -2045,11 +2026,9 @@
if index < 0:
raise SDOPackage.InvalidParameter("get_service(): Not found")
- try:
- return self._sdoSvcProfiles[index].service
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_service()")
+
+ return self._sdoSvcProfiles[index].service
+
@@ -2103,11 +2082,9 @@
self._rtcout.RTC_TRACE("get_configuration()")
if self._SdoConfig is None:
raise SDOPackage.InterfaceNotImplemented("InterfaceNotImplemented: get_configuration")
- try:
- return self._SdoConfig
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_configuration()")
+
+ return self._SdoConfig
+
@@ -2159,7 +2136,7 @@
def get_monitoring(self):
self._rtcout.RTC_TRACE("get_monitoring()")
raise SDOPackage.InterfaceNotImplemented("Exception: get_monitoring")
- return SDOPackage.Monitoring._nil
+
##
@@ -2202,11 +2179,9 @@
def get_organizations(self):
self._rtcout.RTC_TRACE("get_organizations()")
self._sdoOrganizations = self._SdoConfigImpl.getOrganizations()
- try:
- return self._sdoOrganizations
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_organizations()")
+
+ return self._sdoOrganizations
+
@@ -2245,11 +2220,9 @@
# virtual SDOPackage::NVList* get_status_list()
def get_status_list(self):
self._rtcout.RTC_TRACE("get_status_list()")
- try:
- return self._sdoStatus
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_status_list()")
+
+ return self._sdoStatus
+
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoConfiguration.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoConfiguration.py 2016-12-06 01:44:18 UTC (rev 767)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoConfiguration.py 2016-12-19 07:01:27 UTC (rev 768)
@@ -268,13 +268,11 @@
if dProfile is None:
raise SDOPackage.InvalidParameter("dProfile is empty.")
- try:
- guard = OpenRTM_aist.ScopedLock(self._dprofile_mutex)
- self._deviceProfile = dProfile
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("Unknown Error")
+ guard = OpenRTM_aist.ScopedLock(self._dprofile_mutex)
+ self._deviceProfile = dProfile
+
+
return True
@@ -791,13 +789,11 @@
guard = OpenRTM_aist.ScopedLock(self._config_mutex)
- try:
- if not self._configsets.haveConfig(config_id):
- self._rtcout.RTC_ERROR("No such ConfigurationSet")
- raise SDOPackage.InternalError("No such ConfigurationSet")
- except:
- self._rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("Unknown exception")
+
+ if not self._configsets.haveConfig(config_id):
+ self._rtcout.RTC_ERROR("No such ConfigurationSet")
+ raise SDOPackage.InternalError("No such ConfigurationSet")
+
configset = self._configsets.getConfigurationSet(config_id)
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoOrganization.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoOrganization.py 2016-12-06 01:44:18 UTC (rev 767)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/SdoOrganization.py 2016-12-19 07:01:27 UTC (rev 768)
@@ -211,10 +211,9 @@
self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
raise SDOPackage.InternalError("get_organization_property_value()")
- # never reach here
- return None
+
##
# @if jp
#
@@ -260,17 +259,14 @@
if org_property is None:
raise SDOPackage.InvalidParameter("org_property is Empty.")
- try:
- guard = OpenRTM_aist.ScopedLock(self._org_mutex)
- self._orgProperty = org_property
- return True
- except:
- self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("add_organization_property()")
+ guard = OpenRTM_aist.ScopedLock(self._org_mutex)
+ self._orgProperty = org_property
+ return True
+
##
# @if jp
#
@@ -383,6 +379,7 @@
if index < 0:
raise SDOPackage.InvalidParameter("remove_organization_property_value(): Not found.")
+
try:
OpenRTM_aist.CORBA_SeqUtil.erase(self._orgProperty.properties, index)
return True
@@ -390,7 +387,6 @@
self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
raise SDOPackage.InternalError("remove_organization_property_value()")
- return False
##
@@ -477,16 +473,14 @@
if CORBA.is_nil(sdo):
raise SDOPackage.InvalidParameter("set_owner()")
- try:
- self._varOwner = sdo
- return True
- except:
- self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("set_owner()")
+ self._varOwner = sdo
+ return True
+
+
##
# @if jp
#
@@ -524,13 +518,11 @@
# @endif
def get_members(self):
self.__rtcout.RTC_TRACE("get_members()")
- try:
- return self._memberList
- except:
- self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("get_members()")
+ return self._memberList
+
+
##
# @if jp
#
@@ -580,16 +572,14 @@
if sdos is None:
raise SDOPackage.InvalidParameter("set_members(): SDOList is empty.")
- try:
- self._memberList = sdos
- return True
- except:
- self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("set_members()")
+ self._memberList = sdos
+ return True
+
+
##
# @if jp
#
@@ -692,16 +682,17 @@
self.__rtcout.RTC_ERROR("remove_member(): Not found.")
raise SDOPackage.InvalidParameter("remove_member(): Not found.")
+
try:
OpenRTM_aist.CORBA_SeqUtil.erase(self._memberList, index)
return True
except:
self.__rtcout.RTC_ERROR("unknown exception")
raise SDOPackage.InternalError("remove_member(): Not found.")
+
-
##
# @if jp
#
@@ -793,16 +784,13 @@
if dependency is None:
raise SDOPackage.InvalidParameter("set_dependency(): Empty dependency.")
- try:
- self._dependency = dependency
- return True
- except:
- self.__rtcout.RTC_ERROR(OpenRTM_aist.Logger.print_exception())
- raise SDOPackage.InternalError("set_dependency(): Unknown.")
+ self._dependency = dependency
+ return True
+
def getObjRef(self):
return self._objref
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py 2016-12-06 01:44:18 UTC (rev 767)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/TimeValue.py 2016-12-19 07:01:27 UTC (rev 768)
@@ -105,11 +105,9 @@
# @endif
def __sub__(self, tm):
global TIMEVALUE_ONE_SECOND_IN_USECS
- try:
- res = TimeValue()
- except:
- res = OpenRTM_aist.TimeValue()
+ res = TimeValue()
+
if self.tv_sec >= tm.tv_sec:
# +
if self.tv_usec >= tm.tv_usec:
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Timer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Timer.py 2016-12-06 01:44:18 UTC (rev 767)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Timer.py 2016-12-19 07:01:27 UTC (rev 768)
@@ -87,10 +87,9 @@
#
def __del__(self):
self._running = False
- try:
- self.join()
- except:
- pass
+
+ self.join()
+
self._thread = None
def join(self):
More information about the openrtm-commit
mailing list