Skip to content

Commit

Permalink
Merge pull request #6 from KyeRussell/master
Browse files Browse the repository at this point in the history
bugfix: exception raised when zone had no records
  • Loading branch information
jlinn committed Mar 1, 2015
2 parents 9990553 + 6e97b20 commit e961e03
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 e961e03

Please sign in to comment.