Yield HTTPError reason on open error

Having only the error code from urllib is not that interesting.
HTTPError inherits from URLError which has a 'msg' attribute.  Output it
along the error code.

HTTPError does not have a 'reason' attribute although python six
provides it for py27 and later. So fallback to 'msg'.

Change-Id: I591684785fd7af43b833e84fa1e40f46a852bef2
Merge "Yield HTTPError reason on open error"