From bf81e3253b6982f8ee4cdbb32c835d36182a2e43 Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Tue, 22 Jul 2008 12:59:36 -0400 Subject: [PATCH] remove_new_file: don't assume "new-files" exists --- yap/yap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yap/yap.py b/yap/yap.py index 908dc3d..0f426d6 100644 --- a/yap/yap.py +++ b/yap/yap.py @@ -82,7 +82,10 @@ class Yap(object): repo = get_output('git rev-parse --git-dir')[0] path = os.path.join(repo, 'yap', 'new-files') - pickle.dump(files, open(path, 'w')) + try: + pickle.dump(files, open(path, 'w')) + except IOError: + pass def _clear_new_files(self): repo = get_output('git rev-parse --git-dir')[0] -- 2.11.4.GIT