diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-04-20 11:11:46 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-04-20 11:15:46 +0100 |
commit | 9ee4e4c57624cfee21d3bcc132f780bff04a59c4 (patch) | |
tree | 0d68a328d2b2e051de108008a7b552fbce790f59 /morphlib/morphologyfactory.py | |
parent | cc84de3d6ccd63e1d53a2f66815ff1f192a89d36 (diff) | |
download | morph-9ee4e4c57624cfee21d3bcc132f780bff04a59c4.tar.gz |
Drop httplib2 in RemoteRepoCache, use custom HeadRequest and urllib2.
With a neat little trick, urllib2 can be made to only perform a HEAD
request in urllib2.urlopen(). This is done by creating a dedicated
HeadRequest class for HEAD requests and by passing such a HeadRequest to
urllib2.urlopen().
This also means we no longer have to check the response status ourselves
again as urllib2 will raise an exception on negative HTTP responses like
404 or 500.
Diffstat (limited to 'morphlib/morphologyfactory.py')
0 files changed, 0 insertions, 0 deletions