Flat better than nested
This commit is contained in:
parent
4831ebb427
commit
db8b34e618
|
@ -18,7 +18,9 @@ class Result(object):
|
|||
|
||||
def _handle_error(self):
|
||||
error = self.tree.find('error')
|
||||
if error:
|
||||
if not error:
|
||||
return
|
||||
|
||||
code = error.find('code').text
|
||||
msg = error.find('msg').text
|
||||
tmpl = 'Error {code}: {msg}'
|
||||
|
|
Loading…
Reference in New Issue
Block a user