projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59b29d0
)
Broad exception fixed
author
Kamil Madac
<kamil.madac@gmail.com>
Thu, 5 Dec 2013 08:32:29 +0000
(09:32 +0100)
committer
Kamil Madac
<kamil.madac@gmail.com>
Thu, 5 Dec 2013 08:32:29 +0000
(09:32 +0100)
requests/utils.py
patch
|
blob
|
history
diff --git
a/requests/utils.py
b/requests/utils.py
index 7b728c0d71eaeb6e20cebe64c54a224cdb95de78..12ff74df5b1eeaa51b45e74df2339cc8e7332ced 100644
(file)
--- a/
requests/utils.py
+++ b/
requests/utils.py
@@
-432,7
+432,7
@@
def dotted_netmask(mask):
def is_ipv4_address(string_ip):
try:
socket.inet_aton(string_ip)
- except
BaseException
:
+ except
socket.error
:
return False
return True
@@
-442,7
+442,7
@@
def is_ipv4_network(string_network):
if '/' in string_network:
try:
socket.inet_aton(string_network.split('/')[0])
- except
OSE
rror:
+ except
socket.e
rror:
return False
else:
return False