From 0c7054c537e7235ab2792722493b355698a9ec76 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Fri, 16 Nov 2018 23:50:53 -0600 Subject: [PATCH] fixed dumb bug concerning the __ignore__ file --- ext_open/searcher.py | 1 + ext_open/update.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ext_open/searcher.py b/ext_open/searcher.py index 028bbbe..44393ad 100644 --- a/ext_open/searcher.py +++ b/ext_open/searcher.py @@ -62,6 +62,7 @@ class Searcher: args = ['python',UPDATE_PY,self.ext] if update_mtimes: args.append('-m') + # subprocess.check_output(args) self.update_proc = subprocess.Popen(args) def commit(self): diff --git a/ext_open/update.py b/ext_open/update.py index 17ae064..813d70e 100644 --- a/ext_open/update.py +++ b/ext_open/update.py @@ -32,14 +32,14 @@ def build(after,starts): for path in starts: for root,dirs,files in os.walk(path,topdown=True): try: - ignore = any('__ignore__' in files) + ignore = '__ignore__' in files if ignore: - del dirs + dirs[:] = [] else: for file in files: yield os.path.join(root,file) dirs[:] = list(filter(lambda p: osp.getmtime(osp.join(root,p)) > after,dirs)) - except: + except Exception as e: print('Error',root,sep= ': ') def _update(ext,starts,after,do_update_mtimes = False):