mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
SFTP: fix a bug that caused the temporary files underlying EncryptedTemporaryFiles not to be closed.
This commit is contained in:
parent
de95140b7b
commit
db394671e9
@ -557,13 +557,13 @@ class OverwriteableFileConsumer(PrefixingLogMixin):
|
||||
#self.unregisterProducer()
|
||||
|
||||
def close(self):
|
||||
self.is_closed = True
|
||||
self.finish()
|
||||
if not self.is_closed:
|
||||
self.is_closed = True
|
||||
try:
|
||||
self.f.close()
|
||||
except BaseException as e:
|
||||
self.log("suppressed %r from close of temporary file %r" % (e, self.f), level=WEIRD)
|
||||
self.finish()
|
||||
|
||||
def unregisterProducer(self):
|
||||
if self.producer:
|
||||
|
Loading…
Reference in New Issue
Block a user