Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions slacker/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def __init__(self, body):
self.body = json.loads(body)
self.successful = self.body['ok']
self.error = self.body.get('error')
self.response_metadata = self.body.get('response_metadata')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice 🍰

if self.response_metadata:
self.error = '{} - {}'.format(
self.error,
','.join(self.response_metadata.get('messages')),
)
Comment on lines +51 to +55
Copy link
Owner

@os os Feb 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not to modify the error field. I'm happy to merge it once you remove this bit.


def __str__(self):
return json.dumps(self.body)
Expand Down