From 34e428f1cfde7e882e735f1646e78b958240a12c Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Wed, 1 May 2019 08:46:25 -0400 Subject: [PATCH] Workaround unexpected IMAP response reported in issue #75 --- parsedmarc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index f8039ee..355be2e 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -1698,7 +1698,7 @@ def watch_inbox(host, username, password, callback, port=None, ssl=True, idle_start_time = time.monotonic() for response in responses: logging.debug("Received response: {0}".format(response)) - if int(response[0]) > 0 and response[1] == b'RECENT': + if response[0] != 0 and response[1] == b'RECENT': server.idle_done() res = get_dmarc_reports_from_inbox(connection=server, move_supported=ms,