Skip to content

Commit

Permalink
Directly import Client from zulip package.
Browse files Browse the repository at this point in the history
This resolves naming conflicts between the package `zulip`
and the backend module `zulip.py`.
  • Loading branch information
zmlaimeew committed Mar 30, 2021
1 parent 33e7255 commit fe93cd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zulip.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ZULIP_MESSAGE_SIZE_LIMIT = 10000

try:
import zulip
from zulip import Client
except ImportError:
log.exception("Could not start the Zulip back-end")
log.fatal(
Expand Down Expand Up @@ -181,9 +181,9 @@ def __init__(self, config):

compact = config.COMPACT_OUTPUT if hasattr(config, 'COMPACT_OUTPUT') else False
enable_format('text', TEXT_CHRS, borders=not compact)
self.client = zulip.Client(email=self.identity['email'],
api_key=self.identity['key'],
site=self.identity['site'])
self.client = Client(email=self.identity['email'],
api_key=self.identity['key'],
site=self.identity['site'])

def serve_once(self):
self.bot_identifier = self.build_identifier(self.client.email)
Expand Down

0 comments on commit fe93cd8

Please sign in to comment.