From 8154d0ee337a5104ccb6b4152ae5bbac977d9345 Mon Sep 17 00:00:00 2001 From: Jessica Luke Date: Mon, 20 Jun 2016 10:45:16 -0400 Subject: [PATCH 1/2] Check that cc info is in the request before removing it --- sharpy/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) From fd10ef433fa5993d0afd6ef408b15e38493f5e85 Mon Sep 17 00:00:00 2001 From: Jessica Hayley Date: Mon, 20 Jun 2016 10:52:09 -0400 Subject: [PATCH 2/2] Update version number --- sharpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)