From cacce9f1182d10e0d959ff26cde16fecf7db89e4 Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Fri, 14 Jul 2017 13:38:21 -0400 Subject: [PATCH] Fix for the caching of location filenames when they are broken symlinks. --- lib/galaxy/tools/data/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tools/data/__init__.py b/lib/galaxy/tools/data/__init__.py index ed1fb37550b6..5da006e5fc7a 100644 --- a/lib/galaxy/tools/data/__init__.py +++ b/lib/galaxy/tools/data/__init__.py @@ -42,7 +42,7 @@ def tool_data_path_files(self): def update_files(self): try: content = os.walk(self.tool_data_path) - self._tool_data_path_files = set(os.path.join(dirpath, fn) for dirpath, _, fn_list in content for fn in fn_list if fn and fn.endswith('.loc') or fn.endswith('.loc.sample')) + self._tool_data_path_files = set(filter(os.path.exists, [os.path.join(dirpath, fn) for dirpath, _, fn_list in content for fn in fn_list if fn and fn.endswith('.loc') or fn.endswith('.loc.sample')])) self.update_time = time.time() except Exception: log.exception()