From 5aeb953d24917feae9c18cb5f2ae505ab731244a Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Tue, 25 Apr 2017 11:36:49 +0200 Subject: [PATCH] Remove additional traceback print --- mastodon/Mastodon.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 93407e6..2eaec49 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -67,8 +67,6 @@ class Mastodon: response = requests.post(api_base_url + '/api/v1/apps', data = request_data, timeout = request_timeout) response = response.json() except Exception as e: - import traceback - traceback.print_exc() raise MastodonNetworkError("Could not complete request: %s" % e) if to_file != None: @@ -219,8 +217,6 @@ class Mastodon: self.refresh_token = response.get('refresh_token') self.token_expired = int(response.get('expires_in', 0)) except Exception as e: - import traceback - traceback.print_exc() if username is not None or password is not None: raise MastodonIllegalArgumentError('Invalid user name, password, or redirect_uris: %s' % e) elif code is not None: @@ -505,8 +501,6 @@ class Mastodon: else: media_ids_proper.append(media_id) except Exception as e: - import traceback - traceback.print_exc() raise MastodonIllegalArgumentError("Invalid media dict: %s" % e) params_initial["media_ids"] = media_ids_proper @@ -763,8 +757,6 @@ class Mastodon: if method == 'DELETE': response_object = requests.delete(self.api_base_url + endpoint, data = params, headers = headers, files = files, timeout = self.request_timeout) except Exception as e: - import traceback - traceback.print_exc() raise MastodonNetworkError("Could not complete request: %s" % e) if response_object == None: @@ -785,8 +777,6 @@ class Mastodon: try: response = response_object.json() except: - import traceback - traceback.print_exc() raise MastodonAPIError("Could not parse response as JSON, response code was %s, bad json content was '%s'" % (response_object.status_code, response_object.content)) # Handle rate limiting @@ -805,8 +795,6 @@ class Mastodon: self.ratelimit_reset += server_time_diff self.ratelimit_lastcall = time.time() except Exception as e: - import traceback - traceback.print_exc() raise MastodonRatelimitError("Rate limit time calculations failed: %s" % e) if "error" in response and response["error"] == "Throttled":