( )⚙ D11303 zeroconf: fix an issue concatenating bytes and str

This is an archive of the discontinued Mercurial Phabricator instance.

zeroconf: fix an issue concatenating bytes and str
ClosedPublic

Authored by mharbison72 on Aug 18 2021, 3:00 PM.

Details

Summary

bytes(length) doesn't do what we want, so use str.

There appear to be a ton more issues in this extension, including:

  • globals()[b'_GLOBAL_DONE'] using bytes as the key
  • __author__ and similar using bytes
  • BadDomainName is feeding bytes to the Exception constructor
  • DNSRecord.toString() has the wrong signature (should be str, not bytes)

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.