eclipse-paho / eclipse-paho/paho.mqtt.python

ReasonCode.names is missing a ReasonCode.packet_name

Open
#827 6 comments 0 reactions 0 assignees View on GitHub
Status: Available
Dominant language
Python
Stars
2.4k
Forks
742
Avg merge
12d 48m
Merged PRs (30d)
1

Description

While reading the docs about `ReasonCode.names` at https://eclipse.dev/paho/files/paho.mqtt.python/html/types.html#paho.mqtt.reasoncodes.ReasonCode
I was wondering why the `packet_name` useful to know where things come from is not listed. The only way I found was using https://github.com/eclipse/paho.mqtt.python/blob/master/src/paho/mqtt/reasoncodes.py#L190 (`__repr__()`) as `getName()` returns the name only.

Using that function gives me `ReasonCode(Disconnect, 'Unspecified error')` which is better than nothing.

I also would be happy if `getName()` would return an array where 0 is the name and 1 is the packet_name or another way I can get the packet_name.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.