Skip to content
Myr

Broad exception fixed

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kamil Madac · committed by Kamil Madac · parent 59b29d0 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/utils.py+2 added-2 removed
430 unmodified lines
431432def is_ipv4_address(string_ip):433 try:434 socket.inet_aton(string_ip)435 except BaseException:435 except socket.error:436 return False437 return True438439
1 unmodified line
441 """Very simple check of the network format in no_proxy variable"""442 if '/' in string_network:443 try:444 socket.inet_aton(string_network.split('/')[0])445 except OSError:445 except socket.error:446 return False447 else:448 return False449 return True
185 unmodified lines