diff --git a/bots/check-mirroring b/bots/check-mirroring index 9794df9..2724361 100755 --- a/bots/check-mirroring +++ b/bots/check-mirroring @@ -279,7 +279,7 @@ logger.info("Finished receiving Zulip messages!") receive_zephyrs() logger.info("Finished receiving Zephyr messages!") -all_keys = set(zhkeys.keys() + hzkeys.keys()) +all_keys = set(list(zhkeys.keys()) + list(hzkeys.keys())) def process_keys(content_list): # Start by filtering out any keys that might have come from # concurrent check-mirroring processes diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index ee57c1b..9fc6953 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -804,9 +804,9 @@ def add_zulip_subscriptions(verbose): unauthorized = res.get("unauthorized") if verbose: if already is not None and len(already) > 0: - logger.info("\nAlready subscribed to: %s" % (", ".join(already.values()[0]),)) + logger.info("\nAlready subscribed to: %s" % (", ".join(list(already.values())[0]),)) if new is not None and len(new) > 0: - logger.info("\nSuccessfully subscribed to: %s" % (", ".join(new.values()[0]),)) + logger.info("\nSuccessfully subscribed to: %s" % (", ".join(list(new.values())[0]),)) if unauthorized is not None and len(unauthorized) > 0: logger.info("\n" + "\n".join(textwrap.wrap("""\ The following streams you have NOT been subscribed to, diff --git a/zulip/__init__.py b/zulip/__init__.py index 7aba507..79a2ed9 100644 --- a/zulip/__init__.py +++ b/zulip/__init__.py @@ -245,7 +245,7 @@ class Client(object): def do_api_query(self, orig_request, url, method="POST", longpolling = False): request = {} - for (key, val) in orig_request.iteritems(): + for (key, val) in six.iteritems(orig_request): if not (isinstance(val, str) or isinstance(val, six.text_type)): request[key] = simplejson.dumps(val) else: