Skip to content

Commit 1c3b590

Browse files
committed
Avoid clobbering response method
1 parent e9036c0 commit 1c3b590

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

batch_mailchimp/batches_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Batch:
2727
def __init__(self, batches_api, **kwargs):
2828
self._batches_api = batches_api
2929
self._operations = kwargs.get("operations")
30-
self.response = None
30+
self._response = None
3131
self.update(**kwargs)
3232

3333
def update(self, **kwargs):
@@ -56,8 +56,8 @@ def status(self, refresh=False):
5656
return self
5757

5858
def response(self):
59-
if self.response:
60-
return self.response
59+
if self._response:
60+
return self._response
6161
batch = self.status(refresh=True)
6262
if batch._status == "finished" and batch.response_body_url:
6363
content = requests.get(batch.response_body_url).content
@@ -68,11 +68,11 @@ def response(self):
6868
if file_content is None:
6969
continue
7070
output += json.load(file_content)
71-
self.response = ResponseCollection({
71+
self._response = ResponseCollection({
7272
o["operation_id"]: Response(**o)
7373
for o in output
7474
})
75-
return self.response
75+
return self._response
7676

7777
def delete(self):
7878
return self._batches_api.delete_request(self.batch_id)

0 commit comments

Comments
 (0)