Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Casanovas committed Feb 6, 2019
1 parent 972a9fa commit 45d1269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions O365/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def __init__(self, credentials, *, scopes=None,
proxy_server=None, proxy_port=8080, proxy_username=None,
proxy_password=None, requests_delay=200, raise_http_errors=True,
request_retries=3, token_file_name=None, token_backend=None,
tenant_id="common", **kwargs):
tenant_id='common', **kwargs):
""" Creates an API connection object
:param tuple credentials: a tuple of (client_id, client_secret)
Expand Down Expand Up @@ -326,9 +326,9 @@ def __init__(self, credentials, *, scopes=None,
self.naive_session.mount('https://', adapter)

self._oauth2_authorize_url = 'https://login.microsoftonline.com/' \
'{}/oauth2/v2.0/authorize'.format(tenant_id)
'{}/oauth2/v2.0/authorize'.format(tenant_id)
self._oauth2_token_url = 'https://login.microsoftonline.com/' \
'{}/oauth2/v2.0/token'.format(tenant_id)
'{}/oauth2/v2.0/token'.format(tenant_id)

def set_proxy(self, proxy_server, proxy_port, proxy_username,
proxy_password):
Expand Down
4 changes: 2 additions & 2 deletions O365/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ def get_body_text(self):
:return: body as text
:rtype: str
"""
if self.body_type != 'HTML':
if self.body_type.upper() != 'HTML':
return self.body

try:
Expand All @@ -877,7 +877,7 @@ def get_body_soup(self):
:return: BeautifulSoup object of body
:rtype: BeautifulSoup
"""
if self.body_type != 'HTML':
if self.body_type.upper() != 'HTML':
return None
else:
return bs(self.body, 'html.parser')
Expand Down

0 comments on commit 45d1269

Please sign in to comment.