Skip to content

Commit 668fcb9

Browse files
committed
Fix a crash when exc_info == False. Bump version to 1.0.3.
1 parent 4cc527d commit 668fcb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

elasticecslogging/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class IndexNameFrequency(Enum):
9090
'msg']
9191

9292
__AGENT_TYPE = 'python-elasticsearch-ecs-logger'
93-
__AGENT_VERSION = '1.0.2'
93+
__AGENT_VERSION = '1.0.3'
9494
__ECS_VERSION = "1.4.0"
9595

9696
@staticmethod
@@ -436,7 +436,7 @@ def _log_record_to_ecs_fields(self, log_record):
436436

437437
if 'exc_info' in log_record_dict:
438438
exc_info = log_record_dict.pop('exc_info')
439-
if exc_info is not None:
439+
if exc_info:
440440
exc_type, exc_value, traceback_object = exc_info
441441
es_record['error'] = {
442442
'code': exc_type.__name__,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Versions should comply with PEP440. For a discussion on single-sourcing
3131
# the version across setup.py and the project code, see
3232
# https://packaging.python.org/en/latest/single_source_version.html
33-
version='1.0.2',
33+
version='1.0.3',
3434

3535
description='Elasticsearch ECS Log handler for the logging library',
3636
long_description=long_description,

0 commit comments

Comments
 (0)