Code review comment for lp:~mabac/launchpad-work-items-tracker/dont-fail-on-valuerror

Revision history for this message
Guilherme Salgado (salgado) wrote :

Looks good to me. Just one small suggestion:

 review approve

> differences between files attachment (review-diff.txt)
> === modified file 'collect_roadmap'
> --- collect_roadmap 2011-12-13 09:24:21 +0000
> +++ collect_roadmap 2011-12-14 15:27:54 +0000
> @@ -52,6 +52,8 @@
> print "HTTP error: %d" % e.code
> except urllib2.URLError, e:
> print "Network error: %s" % e.reason.args[1]
> + except ValueError, e:
> + print "Data error: %s" % e.message

Can you print the URL here as well so that people looking at the logs
know what they need to fix?

>
> return data
>
> @@ -161,7 +163,10 @@
> acceptance_criteria = None
>
> page = get_json_data(requirement_url + '?json&auth_token=e8a2801e4f0f')
> - assert page is not None, "Could not access Papyrs document %s." % requirement_url
> + if page is None:
> + return {'description': None,
> + 'acceptance_criteria': None}
> +
> page_text_items = page[0]
> page_extra_items = page[1]
>
>

--
Guilherme Salgado <https://launchpad.net/~salgado>

review: Approve

« Back to merge proposal