Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 84151fb

Browse files
authored
Merge branch 'master' into summit-credentials
2 parents 5e3e289 + 52c9434 commit 84151fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pancloud/event.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ def xpoll(self, channel_id=None, data=None, ack=False,
226226
"""
227227
def _ack(channel_id, **kwargs):
228228
r = self.ack(channel_id, **kwargs)
229-
try:
230-
r_json = r.json()
231-
except ValueError as e:
232-
raise PanCloudError('Invalid JSON: %s' % e)
233229

234230
if not (200 <= r.status_code < 300):
231+
try:
232+
r_json = r.json()
233+
except ValueError as e:
234+
raise PanCloudError('Invalid JSON: %s' % e)
235235
if 'errorCode' in r_json and 'errorMessage' in r_json:
236236
raise PanCloudError('%s: %s' %
237237
(r_json['errorCode'],

0 commit comments

Comments
 (0)