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
......@@ -252,8 +252,9 @@ class OrderBuilder(XMLObject, Amount, Predicate):
result = 1
for key in property_dict:
getter_name = 'get%s' % convertToUpperCase(key)
if hasattr(instance, getter_name):
value = getattr(instance, getter_name)()
getter = getattr(instance, getter_name, None)
if getter is not None:
value = getter()
if value != property_dict[key]:
result = 0
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