Skip to content

Commit

Permalink
update xml tag for table row count to resolve #131 (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
bl-young committed Jan 20, 2023
1 parent 5b69640 commit 7821acb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stewi/GHGRP.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ def get_row_count(table, report_year):
try:
count_request = requests.get(count_url)
count_xml = minidom.parseString(count_request.text)
table_count = count_xml.getElementsByTagName('RequestRecordCount')
table_count = count_xml.getElementsByTagName('TOTALQUERYRESULTS')
table_count = int(table_count[0].firstChild.nodeValue)
except:
log.exception('error in url request')
except IndexError:
log.exception('error accessing table count')
raise
return table_count


Expand Down

0 comments on commit 7821acb

Please sign in to comment.