From 3ce6cc15b0ba6ab4c89aa7a32c1ff1ca78271eca Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Fri, 31 Jul 2015 21:07:51 -0700 Subject: [PATCH] bugz --- tildetown-py/stats.py | 2 +- tildetown-py/util.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tildetown-py/stats.py b/tildetown-py/stats.py index de3932d..11cf49b 100644 --- a/tildetown-py/stats.py +++ b/tildetown-py/stats.py @@ -19,7 +19,7 @@ def default_p(username): def bounded_find(path): # find might return 1 but still have worked fine. - return find(path, "-maxdepth" "3", _ok_code=[0,1]) + return find(path, "-maxdepth", "3", _ok_code=[0,1]) def guarded_mtime(path): try: diff --git a/tildetown-py/util.py b/tildetown-py/util.py index 3b1fd5d..bc58dc0 100644 --- a/tildetown-py/util.py +++ b/tildetown-py/util.py @@ -1,7 +1,10 @@ def slurp(file_path): contents = None - with open(file_path, 'r') as f: - contents = f.read() + try: + with open(file_path, 'r') as f: + contents = f.read() + except FileNotFoundError: + pass return contents def thread(initial, *fns):