From 5630520771de46c9a777284f29d0cae5849b0c5e Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Tue, 21 Jul 2020 10:20:01 +0200 Subject: [PATCH] Pass exception to log.exception as it is not called from within an except: clause. Add Python 3.8 test support, drop Python 3.4 test support. --- .travis.yml | 2 +- dsmr_parser/clients/protocol.py | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 311a607..bc6b513 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: python python: - 2.7 - - 3.4 - 3.5 - 3.6 + - 3.8 install: pip install tox-travis codecov diff --git a/dsmr_parser/clients/protocol.py b/dsmr_parser/clients/protocol.py index e43e230..3961853 100644 --- a/dsmr_parser/clients/protocol.py +++ b/dsmr_parser/clients/protocol.py @@ -95,7 +95,7 @@ class DSMRProtocol(asyncio.Protocol): def connection_lost(self, exc): """Stop when connection is lost.""" if exc: - self.log.exception('disconnected due to exception') + self.log.exception('disconnected due to exception', exc_info=exc) else: self.log.info('disconnected because of close/abort.') self._closed.set() diff --git a/tox.ini b/tox.ini index a3e12f0..f2e6de4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py34,py35,py36,py37 +envlist = py35,py36,py37,py38 [testenv] deps=