Skip to content

Commit

Permalink
Catch and warn user about XML ParseError during MD5 fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
eddie3 committed Jul 7, 2016
1 parent 2afb02f commit 32f61c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gogrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@ def fetch_file_info(d, fetch_md5):
d.md5 = shelf_etree.attrib['md5']
except HTTPError as e:
if e.code == 404:
warn("no md5 data found for %s" % d.name)
warn("no md5 data found for {}".format(d.name))
else:
raise
except xml.etree.ElementTree.ParseError:
warn('xml parsing error occurred trying to get md5 data for {}'.format(d.name))


def filter_downloads(out_list, downloads_list, lang_list, os_list):
Expand Down

0 comments on commit 32f61c0

Please sign in to comment.