mypy: Add type ignores for mixing of str & bytes in zephyr mirror.

In principle these should be fixed properly, but the zephyr code is
difficult to test except in a production setting and is unlikely to be
heavily developed in future.
This commit is contained in:
neiljp (Neil Pilgrim) 2020-03-17 18:42:39 -07:00 committed by Tim Abbott
parent 520a004b85
commit 60984ab2fa
2 changed files with 11 additions and 9 deletions

View file

@ -112,7 +112,8 @@ def send_zephyr(zwrite_args, content):
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate(input=content.encode("utf-8"))
if p.returncode != 0:
if "Detected server failure while receiving acknowledgement for" in stdout:
# FIXME: This should really look for a byte form of the string in stdout
if "Detected server failure while receiving acknowledgement for" in stdout: # type: ignore
logger.warning("Got server failure error sending zephyr; retrying")
logger.warning(stderr)
return True