Incorporate "Use os.path.isfile() and isdir()" from freeipa upstream

b29db07c3b3d8937f53684fdbba985fec525d69d by Christian Heimes

    Replace custom file_exists() and dir_exists() functions with proper
    functions from Python's stdlib.

    The change also gets rid of pylint's invalid bad-python3-import error,
    https://github.com/PyCQA/pylint/issues/1565
This commit is contained in:
Thomas Woerner
2018-04-04 15:11:34 +02:00
parent 50bbd82338
commit 71ec4d4e2a
4 changed files with 5 additions and 5 deletions

View File

@@ -201,8 +201,8 @@ def main():
if on_master:
sssd_enable_service(module, sssdconfig, 'ifp')
if (("ssh" in services and file_exists(paths.SSH_CONFIG)) or
("sshd" in services and file_exists(paths.SSHD_CONFIG))):
if (("ssh" in services and os.path.isfile(paths.SSH_CONFIG)) or
("sshd" in services and os.path.isfile(paths.SSHD_CONFIG))):
sssd_enable_service(module, sssdconfig, 'ssh')
if "sudo" in services: