Skip to content

Commit

Permalink
bugfix: exception raised when zone had no records
Browse files Browse the repository at this point in the history
  • Loading branch information
KyeRussell committed Mar 1, 2015
1 parent 9990553 commit 6e97b20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions pyflare/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ def rec_load_all(self, zone):
'o': current_count,
'z': zone
})
has_more = records['response']['recs']['has_more']
current_count += records['response']['recs']['count']
for record in records['response']['recs']['objs']:
yield record
try:
has_more = records['response']['recs']['has_more']
current_count += records['response']['recs']['count']
for record in records['response']['recs']['objs']:
yield record
except KeyError:
has_more = False

def zone_check(self, zones):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='pyflare',
version='1.1.1',
version='1.1.2',
packages=packages,
url='https://github.com/jlinn/pyflare',
license='LICENSE.txt',
Expand Down

0 comments on commit 6e97b20

Please sign in to comment.