diff --git a/src/python/jw/util/Config.py b/src/python/jw/util/Config.py index 5ec6352..8102a09 100644 --- a/src/python/jw/util/Config.py +++ b/src/python/jw/util/Config.py @@ -14,15 +14,6 @@ class Config(): # export def __load(self, search_dirs, glob_paths, refuse_mode_mask): - def __is_abs(path): - if path is None: - return False - if len(path) == 0: - return False - if path[0] != '/': - return False - return True - ret = StringTree("", "") exe = Path(os.path.basename(sys.argv[0])).stem if glob_paths is None: @@ -37,7 +28,10 @@ class Config(): # export for path in glob_paths: dirs = search_dirs if dirs is None: - dirs = [''] if __is_abs(path) else [str(Path.home()), str(Path.cwd())] + if path and os.path.isabs(path): + dirs = [''] + else: + dirs = [str(Path.home()), str(Path.cwd())] for d in dirs: g = d + '/' + path if len(d) else path slog(DEBUG, 'Looking for config "{}"'.format(g))