Use socket.error instead of non-existent socket.Error (#43499)
This commit is contained in:
parent
9169daa326
commit
6d680d8281
1 changed files with 3 additions and 3 deletions
|
@ -3580,7 +3580,7 @@ def validateValueAgainstRule(ruleString, variableValue):
|
|||
try:
|
||||
socket.inet_pton(socket.AF_INET, variableValue)
|
||||
result = True
|
||||
except socket.Error:
|
||||
except socket.error:
|
||||
result = False
|
||||
if(result is True):
|
||||
return "ok"
|
||||
|
@ -3598,7 +3598,7 @@ def validateValueAgainstRule(ruleString, variableValue):
|
|||
result = True
|
||||
else:
|
||||
result = False
|
||||
except socket.Error:
|
||||
except socket.error:
|
||||
result = False
|
||||
if(result is True):
|
||||
return "ok"
|
||||
|
@ -3609,7 +3609,7 @@ def validateValueAgainstRule(ruleString, variableValue):
|
|||
try:
|
||||
socket.inet_pton(socket.AF_INET6, variableValue)
|
||||
result = True
|
||||
except socket.Error:
|
||||
except socket.error:
|
||||
result = False
|
||||
if(result is True):
|
||||
return "ok"
|
||||
|
|
Loading…
Reference in a new issue