added urllib2.HTTPError to except clause in binary method
Indentation adjusted