Partially apply Python 3 libmodernize.fixes.fix_dict_six.
Refer to #256
This commit is contained in:
parent
7ccd60584a
commit
5e3013d2c2
|
@ -279,7 +279,7 @@ logger.info("Finished receiving Zulip messages!")
|
||||||
receive_zephyrs()
|
receive_zephyrs()
|
||||||
logger.info("Finished receiving Zephyr messages!")
|
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):
|
def process_keys(content_list):
|
||||||
# Start by filtering out any keys that might have come from
|
# Start by filtering out any keys that might have come from
|
||||||
# concurrent check-mirroring processes
|
# concurrent check-mirroring processes
|
||||||
|
|
|
@ -804,9 +804,9 @@ def add_zulip_subscriptions(verbose):
|
||||||
unauthorized = res.get("unauthorized")
|
unauthorized = res.get("unauthorized")
|
||||||
if verbose:
|
if verbose:
|
||||||
if already is not None and len(already) > 0:
|
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:
|
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:
|
if unauthorized is not None and len(unauthorized) > 0:
|
||||||
logger.info("\n" + "\n".join(textwrap.wrap("""\
|
logger.info("\n" + "\n".join(textwrap.wrap("""\
|
||||||
The following streams you have NOT been subscribed to,
|
The following streams you have NOT been subscribed to,
|
||||||
|
|
|
@ -245,7 +245,7 @@ class Client(object):
|
||||||
def do_api_query(self, orig_request, url, method="POST", longpolling = False):
|
def do_api_query(self, orig_request, url, method="POST", longpolling = False):
|
||||||
request = {}
|
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)):
|
if not (isinstance(val, str) or isinstance(val, six.text_type)):
|
||||||
request[key] = simplejson.dumps(val)
|
request[key] = simplejson.dumps(val)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue