Skip to content

Commit 747bd26

Browse files
committed
Standardize return type
1 parent 70a9954 commit 747bd26

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

moesifasgi/client_ip.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ def is_ip(cls, value):
1616
try:
1717
ip = ipaddress.ip_address(value)
1818
return True
19-
except:
20-
# Ignore any error
21-
pass
22-
23-
return None
19+
except ValueError:
20+
return False
2421

2522
def getClientIpFromXForwardedFor(self, value, debug = False):
2623
try:

0 commit comments

Comments
 (0)