mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
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:
1 parent
fad88b358b
commit
b29db07c3b
26 files changed
+57
-78
No files matched your search
+1
-1
@@ -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))
|
||||
|
||||
|
||||
Reference in new issue
Block a user