HAP-python
HAP-python copied to clipboard
Late-import base36 and QR code libraries; remove SUPPORT_QR_CODE flag
Some tests run locally for home-assistant/core would fail with a cryptic "base36 is not defined" error if that library was not installed.
This PR:
- makes that error message cleaner – it's now a
RuntimeErrorthat has the import error as a reason - makes
pyhapnot importbase36orQRCodeat all until they are needed- in doing that removes the
SUPPORT_QR_CODEflag; based on GitHub Code Search there are no external users for that flag that I can see.
- in doing that removes the