From 933ec723bd64c39bae21afb1e763d3becf1f0bfc Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 9 Mar 2021 15:37:01 +0000 Subject: [PATCH] plugins/eddn: Call requests.Session.close() in EDDN.close() Avoids a `-W default` warning on shutdown. --- plugins/eddn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index c9565c7e..22f76ec6 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -113,7 +113,7 @@ class EDDN: self.replayfile.flush() def close(self): - """Close the replay file.""" + """Close down the EDDN class instance.""" logger.debug('Closing replayfile...') if self.replayfile: self.replayfile.close() @@ -121,6 +121,9 @@ class EDDN: self.replayfile = None logger.debug('Done.') + logger.debug('Closing EDDN requests.Session.') + self.session.close() + def send(self, cmdr: str, msg: Mapping[str, Any]) -> None: """ Send sends an update to EDDN