← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-librarian-client-resource-warning into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-librarian-client-resource-warning into launchpad:master.

Commit message:
Fix ResourceWarning in librarian client

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/397513
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-librarian-client-resource-warning into launchpad:master.
diff --git a/lib/lp/services/librarian/client.py b/lib/lp/services/librarian/client.py
index 219d80d..bc35ec4 100644
--- a/lib/lp/services/librarian/client.py
+++ b/lib/lp/services/librarian/client.py
@@ -113,7 +113,9 @@ class FileUploadClient:
         self.state.s_poll.unregister(self.state.s.fileno())
         self.state.s_poll.close()
         del self.state.s_poll
+        self.state.s.close()
         del self.state.s
+        self.state.f.close()
         del self.state.f
 
     def _checkError(self):