diff --git a/sharpy/__init__.py b/sharpy/__init__.py index 73dbc55..6c6b026 100644 --- a/sharpy/__init__.py +++ b/sharpy/__init__.py @@ -1 +1 @@ -VERSION = (0, 9, 6) +VERSION = (0, 9, 7) diff --git a/sharpy/client.py b/sharpy/client.py index 579faee..1a2ea97 100644 --- a/sharpy/client.py +++ b/sharpy/client.py @@ -100,12 +100,11 @@ def make_request(self, path, params=None, data=None, method=None): # Clean credit card info from when the request gets logged # (remove ccv and only show last four of card num) cleaned_data = data.copy() - try: + if 'subscription[ccCardCode]' in cleaned_data: del cleaned_data['subscription[ccCardCode]'] + if 'subscription[ccNumber]' in cleaned_data: ccNum = cleaned_data['subscription[ccNumber]'] cleaned_data['subscription[ccNumber]'] = ccNum[-4:] - except KeyError: - cleaned_data['subscription[ccNumber]'] = None client_log.debug('Request Method: %s' % method) client_log.debug('Request Body (Cleaned Data): %s' % cleaned_data)