raises exception when wrong appID is given
This commit is contained in:
parent
1a265a7c68
commit
b54008188e
|
@ -14,6 +14,8 @@ compat.fix_HTTPMessage()
|
|||
class Result(object):
|
||||
def __init__(self, stream):
|
||||
self.tree = etree.parse(stream)
|
||||
if self.tree.getroot().find('error') is not None:
|
||||
raise Exception('you may have entered the wrong appid')
|
||||
|
||||
def __iter__(self):
|
||||
return (Pod(node) for node in self.tree.findall('pod'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user