From 4291cfb8aed27b119552f6334e0e5ee38ebd1ceb Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Fri, 2 Nov 2012 14:16:15 +0100 Subject: [PATCH] Don't close empty object --- apps/search/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/search/index.py b/apps/search/index.py index 66a7b3420..f09a42e53 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -93,7 +93,8 @@ class Snippets(object): def close(self): """Close snippet file""" - self.file.close() + if self.file: + self.file.close() def remove(self): self.revision = None -- 2.20.1