Commit fc17fa22 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Do not use hasattr.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19118 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf772456
No related merge requests found
...@@ -252,8 +252,9 @@ class OrderBuilder(XMLObject, Amount, Predicate): ...@@ -252,8 +252,9 @@ class OrderBuilder(XMLObject, Amount, Predicate):
result = 1 result = 1
for key in property_dict: for key in property_dict:
getter_name = 'get%s' % convertToUpperCase(key) getter_name = 'get%s' % convertToUpperCase(key)
if hasattr(instance, getter_name): getter = getattr(instance, getter_name, None)
value = getattr(instance, getter_name)() if getter is not None:
value = getter()
if value != property_dict[key]: if value != property_dict[key]:
result = 0 result = 0
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment