Skip to content

Commit

Permalink
Merge pull request #165 from seomoz/fix-empty-reponse-chronos
Browse files Browse the repository at this point in the history
Avoid decoding Json when 204 empty response received [ROGER-2895] - v0.4.25
  • Loading branch information
vmahedia authored Aug 13, 2018
2 parents 3181b2a + cbbc695 commit 9d08fb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.24
0.4.25
3 changes: 2 additions & 1 deletion cli/roger_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ def main(self, settings, appConfig, frameworkObject, hooksObj, args):
container_name, environment, act_as_user)
# // operator does floor division, rounds up to integer
color = "green" if resp.status_code // 100 == 2 else "red"
print(colored(json.dumps(resp.json(), indent=4), color))
if not resp.status_code == 204: # empty response
print(colored(json.dumps(resp.json(), indent=4), color))
container_task_id = self.utils.modify_task_id(task_id)
self.task_id.extend(container_task_id)
except (Exception) as e:
Expand Down

0 comments on commit 9d08fb2

Please sign in to comment.