mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
Fix pylint warnings inconsistent-return-statements
Add consistent return to all functions and methods that are covered by tox -e pylint[23]. I haven't checked if return None is always a good idea or if we should rather raise an error. See: https://pagure.io/freeipa/issue/7326 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -232,6 +232,7 @@ class CheckedIPAddress(UnsafeIPAddress):
|
||||
|
||||
if ifnet.ip == self:
|
||||
return InterfaceDetails(interface, ifnet)
|
||||
return None
|
||||
|
||||
def set_ip_net(self, ifnet):
|
||||
"""Set IP Network details for this address. IPNetwork is valid only
|
||||
@@ -928,7 +929,7 @@ def ipa_generate_password(entropy_bits=256, uppercase=1, lowercase=1, digits=1,
|
||||
|
||||
|
||||
def user_input(prompt, default = None, allow_empty = True):
|
||||
if default == None:
|
||||
if default is None:
|
||||
while True:
|
||||
try:
|
||||
ret = input("%s: " % prompt)
|
||||
@@ -980,6 +981,8 @@ def user_input(prompt, default = None, allow_empty = True):
|
||||
else:
|
||||
return ret
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def host_port_open(host, port, socket_type=socket.SOCK_STREAM,
|
||||
socket_timeout=None, log_errors=False,
|
||||
|
||||
Reference in New Issue
Block a user