Skip to content

handleError() cannot handle None #3

Description

@uli42

In the except part you call self.handleError(None). This does not work, I see this:

File "/usr/lib64/python2.7/logging/init.py", line 821, in handleError
record.filename, record.lineno))
AttributeError: 'NoneType' object has no attribute 'filename'

it is unclear to me if it is allowed to call handleError() here at all. But if it is allowed you should pass an "empty" LogRecord instead of None.

(I know this is Python 2.7 and should be updated to 3.x where exception handling in the LogHandlers has changed but a bug is a bug...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions