Skip to content

Commit

Permalink
Fixed Python 3 issues in cawateroffice by having requests.response.it…
Browse files Browse the repository at this point in the history
…er_lines decode_unicode and using next(iter) vs iter.next()
  • Loading branch information
abkfenris committed Sep 6, 2015
1 parent 5d78435 commit 1404ffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/remote/cawateroffice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def get_from_wateroffice(self, remote_id):
province = remote_id.split('_')[0]
url = 'http://dd.weather.gc.ca/hydrometric/csv/{}/hourly/{}_hourly_hydrometric.csv'.format(province, remote_id)
response = requests.get(url)
riter = response.iter_lines()
riter.next()
riter = response.iter_lines(decode_unicode=True)
next(riter)
reader = csv.reader(riter)
lines = []
for row in reader:
Expand Down

0 comments on commit 1404ffb

Please sign in to comment.