HomePhabricator

zeroconf: fix an issue concatenating bytes and str

Authored by mharbison72.

Description

zeroconf: fix an issue concatenating bytes and str

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)

Differential Revision: https://phab.mercurial-scm.org/D11303