Skip to content

Commit

Permalink
http: fix re-export
Browse files Browse the repository at this point in the history
Fixes #19. Thanks to @rsommer the report.
  • Loading branch information
geertj committed Jul 3, 2015
1 parent f19b56a commit 5c3a741
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gruvi/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
# Export some definitions from http.client.
for name in dir(http_client):
value = getattr(http_client, name)
if name.isupper() and value in http_client.responses:
if not name.isupper() or not isinstance(value, int):
continue
if value in http_client.responses:
globals()[name] = value

HTTP_PORT = http_client.HTTP_PORT
Expand Down

0 comments on commit 5c3a741

Please sign in to comment.