Skip to content

Commit

Permalink
Use relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sdiemer committed May 23, 2019
1 parent aa07e33 commit 33b5549
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions mm_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import logging
import os
import requests
from mm_client import lib as mm_lib
from mm_client import signing
from mm_client.long_polling import LongPollingManager
from mm_client.ssh_tunnel import SSHTunnelManager
from . import lib as mm_lib
from .signing import get_signature
from .long_polling import LongPollingManager
from .ssh_tunnel import SSHTunnelManager

__version__ = '4.0'
logger = logging.getLogger('mm_client')
Expand Down Expand Up @@ -102,7 +102,7 @@ def api_request(self, url_or_action, method='get', headers=None, params=None, da
logger.error('Registration failed: %s', e)
raise Exception('Registration failed: %s' % e)
# Add signature in headers
_headers = signing.get_signature(self) if not anonymous else dict()
_headers = get_signature(self) if not anonymous else dict()
if headers:
_headers.update(headers)
# Make API request
Expand Down
4 changes: 2 additions & 2 deletions mm_client/long_polling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import time
import traceback

from mm_client import signing
from .signing import check_signature

logger = logging.getLogger('mm_client.long_polling')

Expand Down Expand Up @@ -85,7 +85,7 @@ def call_long_polling(self):
def process_long_polling(self, response):
logger.debug('Processing response.')
if self.client.conf.get('API_KEY'):
invalid = signing.check_signature(self.client, response)
invalid = check_signature(self.client, response)
if invalid:
raise Exception('Invalid signature: %s' % invalid)
action = response.get('action')
Expand Down

0 comments on commit 33b5549

Please sign in to comment.