Handle urllib errors correctly.

While downloading golden images we might be looking for a file that
does not exist. The error handling we put in place was incorrect because
it was recreating an instance of urllib2.HTTPError instead of re-raising it.

We are now adding more information to the message portion of the exception and re-raising it.

** Also correctly naming pi device.

BUG=chromium:363815
TEST=Attempted to download a non-existing file. Verified expected exception was thrown.

Change-Id: Ia5d5960955ecfe0a1f86ef5c0c049c562569704f
Reviewed-on: https://chromium-review.googlesource.com/201959
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
2 files changed