I have to check that file exists or not, and if it does, have to return path to it , the main problem is that os.path.isdir
returns only True
or False
depending on existence, so it seems it does not fit. Any hints? Current schema in my mind is:
def get_config_path():
if exists(path1):
return path1
if exists(path2):
return path2