mirror of https://github.com/zulip/zulip.git
zerver/management: Remove `import six`.
This commit is contained in:
parent
2ae47525d3
commit
0fa3c1d876
|
@ -25,7 +25,6 @@ recipient address and retrieve, forward, and archive the message.
|
|||
|
||||
from __future__ import print_function
|
||||
|
||||
import six
|
||||
from typing import Any, List, Generator
|
||||
|
||||
import logging
|
||||
|
@ -65,10 +64,7 @@ def get_imap_messages():
|
|||
for msgid in num_ids_data[0].split():
|
||||
status, msg_data = mbox.fetch(msgid, '(RFC822)')
|
||||
msg_as_bytes = msg_data[0][1]
|
||||
if six.PY2:
|
||||
message = email.message_from_string(msg_as_bytes)
|
||||
else:
|
||||
message = email.message_from_bytes(msg_as_bytes)
|
||||
message = email.message_from_bytes(msg_as_bytes)
|
||||
yield message
|
||||
mbox.store(msgid, '+FLAGS', '\\Deleted')
|
||||
mbox.expunge()
|
||||
|
|
|
@ -8,7 +8,6 @@ from django.core.management.base import BaseCommand, CommandParser
|
|||
from zerver.lib.actions import check_add_realm_emoji, do_remove_realm_emoji
|
||||
from zerver.lib.management import ZulipBaseCommand
|
||||
import sys
|
||||
import six
|
||||
|
||||
class Command(ZulipBaseCommand):
|
||||
help = """Manage emoji for the specified realm
|
||||
|
@ -44,7 +43,7 @@ Example: ./manage.py realm_emoji --realm=zulip.com --op=show
|
|||
realm = self.get_realm(options)
|
||||
assert realm is not None # Should be ensured by parser
|
||||
if options["op"] == "show":
|
||||
for name, url in six.iteritems(realm.get_emoji()):
|
||||
for name, url in realm.get_emoji().items():
|
||||
print(name, url)
|
||||
sys.exit(0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue