commit: 7f3945f376304360689cb8cb9c1777ed69ac4367
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 13 02:30:50 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 13 02:30:50 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=7f3945f3
flocker.py: Adds check to ensure get_file isn't passing a closed io object
layman/flocker.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/flocker.py b/layman/flocker.py
index 21f34c3..36a12b8 100644
--- a/layman/flocker.py
+++ b/layman/flocker.py
@@ -72,7 +72,7 @@ class FileLocker(object):
'''Obtains file object for given path'''
assert mode in ('r', 'w+')
- if path not in self.files:
+ if path not in self.files or self.files[path].closed:
self.files[path] = fileopen(path, mode)
f = self.files[path]