Loading buildstream/utils.py +14 −0 Original line number Diff line number Diff line Loading @@ -1242,3 +1242,17 @@ def _deduplicate(iterable, key=None): def _get_link_mtime(path): path_stat = os.lstat(path) return path_stat.st_mtime # Returns the first directory to contain filename, or an empty string if # none found # def _search_upward_for_file(directory, filename): directory = os.path.abspath(directory) while not os.path.isfile(os.path.join(directory, filename)): parent_dir = os.path.dirname(directory) if directory == parent_dir: return "" directory = parent_dir return directory Loading
buildstream/utils.py +14 −0 Original line number Diff line number Diff line Loading @@ -1242,3 +1242,17 @@ def _deduplicate(iterable, key=None): def _get_link_mtime(path): path_stat = os.lstat(path) return path_stat.st_mtime # Returns the first directory to contain filename, or an empty string if # none found # def _search_upward_for_file(directory, filename): directory = os.path.abspath(directory) while not os.path.isfile(os.path.join(directory, filename)): parent_dir = os.path.dirname(directory) if directory == parent_dir: return "" directory = parent_dir return directory