diff options
author | Christian Heimes <cheimes@redhat.com> | 2017-10-20 11:10:20 +0200 |
---|---|---|
committer | Stanislav Laznicka <slaznick@redhat.com> | 2017-10-20 12:27:19 +0200 |
commit | b29db07c3b3d8937f53684fdbba985fec525d69d (patch) | |
tree | dde1a80e83816e4d4e98597905d407fa24135f05 /ipalib | |
parent | fad88b358b6bd40b96ea7db11c2d7ed148225d06 (diff) | |
download | freeipa-b29db07c3b3d8937f53684fdbba985fec525d69d.tar.gz freeipa-b29db07c3b3d8937f53684fdbba985fec525d69d.tar.xz freeipa-b29db07c3b3d8937f53684fdbba985fec525d69d.zip |
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>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugable.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 13efe331a..66a200ea3 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -515,7 +515,7 @@ class API(ReadOnly): Add global options to an optparse.OptionParser instance. """ def config_file_callback(option, opt, value, parser): - if not ipautil.file_exists(value): + if not os.path.isfile(value): parser.error( _("%(filename)s: file not found") % dict(filename=value)) |