Skip to content

Work around python 3.6 enum bug

Benjamin Tissoires requested to merge bentiss/hid-tools:wip/python3.6 into master

With a Unit HID item, on python 3.6 (RHEL 8) we do get the following:

>>> print(unit.system)
SILinear
>>> print(f'{unit.system}')
1
>>> print(f'{unit.system.__str__()}')
SILinear

We actually rely on SILinear to be used, not 1. So for those systems with old python, enforce the use of __str__().

cc: @whot

Merge request reports