Skip to content

Fatal error when someone without nickname sends something to bot #12

@ableev

Description

@ableev
{u'first_name': u'XXX', u'last_name': u'YYY', u'type': u'private', u'id': NNN}
Traceback (most recent call last):
  File "./zbxtg.py", line 212, in <module>
    main()
  File "./zbxtg.py", line 162, in main
    if chat["username"] == zbx_to:
KeyError: 'username'

In case when user doesn't have a nickname, script will fall.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions