Use os.path.isfile() and isdir()

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

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Christian Heimes
2017-10-20 11:10:20 +02:00
committed by Stanislav Laznicka
parent fad88b358b
commit b29db07c3b
26 changed files with 57 additions and 78 deletions

View File

@@ -84,7 +84,7 @@ DS_INSTANCE_PREFIX = 'slapd-'
def find_server_root():
if ipautil.dir_exists(paths.USR_LIB_DIRSRV_64):
if os.path.isdir(paths.USR_LIB_DIRSRV_64):
return paths.USR_LIB_DIRSRV_64
else:
return paths.USR_LIB_DIRSRV