Skip to content

Commit b5721b3

Browse files
committed
getting rid of other print statements
1 parent 49bcc93 commit b5721b3

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

cms_bluebutton/auth.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import string
66
import datetime
77
import urllib
8+
from cms_bluebutton.tests.fixtures import token_response
89
from requests_toolbelt.multipart.encoder import MultipartEncoder
910

1011
from .constants import SDK_HEADERS
@@ -119,15 +120,7 @@ def get_access_token_from_code(bb, auth_data, callback_code, callback_state) ->
119120
}
120121

121122
token_response = _do_post(data, bb, None)
122-
try:
123-
token_response.raise_for_status()
124-
except requests.exceptions.HTTPError as e:
125-
print(f'Error obtaining access token: {e}')
126-
print(f'Response content: {token_response.text}')
127-
print(f'Request data: {data}')
128-
print(f'Request headers: {SDK_HEADERS}')
129-
print(f'Request URL: {bb.auth_token_url}')
130-
raise
123+
token_response.raise_for_status()
131124
token_dict = token_response.json()
132125
token_dict["expires_at"] = datetime.datetime.now(
133126
datetime.timezone.utc
@@ -153,10 +146,6 @@ def _do_post(data, bb, auth):
153146
mp_encoder = MultipartEncoder(data)
154147
headers = SDK_HEADERS
155148
headers["content-type"] = mp_encoder.content_type
156-
print(f'headers: {headers}')
157-
print(f'url: {bb.auth_token_url}')
158-
print(f'data: {data}')
159-
print(f'auth: {auth}')
160149

161150
return requests.post(
162151
url=bb.auth_token_url,

cms_bluebutton/cms_bluebutton.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818

1919

2020
ROOT_DIR = os.path.abspath(os.curdir) + "/"
21-
print("ROOT_DIR:", ROOT_DIR)
2221
DEFAULT_CONFIG_FILE_LOCATION = ROOT_DIR + "./.bluebutton-config.json"
23-
print("DEFAULT_CONFIG_FILE_LOCATION:", DEFAULT_CONFIG_FILE_LOCATION)
24-
2522

2623
class BlueButton:
2724

@@ -156,8 +153,4 @@ def generate_authorize_url(self, auth_data):
156153
return generate_authorize_url(self, auth_data)
157154

158155
def get_authorization_token(self, auth_data, callback_code, callback_state):
159-
print("Getting authorization token...")
160-
print("Auth Data:", auth_data)
161-
print("Callback Code:", callback_code)
162-
print("Callback State:", callback_state)
163156
return get_authorization_token(self, auth_data, callback_code, callback_state)

0 commit comments

Comments
 (0)