From db394671e91e3ca78d6f0364b6ab2197bd35e1eb Mon Sep 17 00:00:00 2001 From: david-sarah Date: Mon, 31 May 2010 22:53:10 -0700 Subject: [PATCH] SFTP: fix a bug that caused the temporary files underlying EncryptedTemporaryFiles not to be closed. --- src/allmydata/frontends/sftpd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/frontends/sftpd.py b/src/allmydata/frontends/sftpd.py index 3ba07146..a624dddc 100644 --- a/src/allmydata/frontends/sftpd.py +++ b/src/allmydata/frontends/sftpd.py @@ -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: -- 2.45.2