fixed problem with pypy

This commit is contained in:
mdipierro
2012-09-27 22:09:23 -05:00
parent f667c6224f
commit 29201be7f0
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-09-27 21:45:13) stable
Version 2.0.9 (2012-09-27 22:09:19) stable
+3 -2
View File
@@ -140,8 +140,9 @@ class LockedFile(object):
self.file.close()
self.file = None
def __del__(self):
self.close()
if not self.file is None:
self.close()
def read_locked(filename):
fp = LockedFile(filename, 'r')
data = fp.read()