fixed problem with pypy
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.0.9 (2012-09-27 21:45:13) stable
|
||||
Version 2.0.9 (2012-09-27 22:09:19) stable
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user