Merge pull request #71 from guardicore/bugfix/monkey-dead-key-not-exist

Fix bug where 'dead' property of monkey wasn't defined
This commit is contained in:
Daniel Goldberg 2017-11-11 11:40:51 +02:00 committed by GitHub
commit ab0f0aefef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ class Monkey(flask_restful.Resource):
def post(self, **kw): def post(self, **kw):
monkey_json = json.loads(request.data) monkey_json = json.loads(request.data)
monkey_json['dead'] = False
if 'keepalive' in monkey_json: if 'keepalive' in monkey_json:
monkey_json['keepalive'] = dateutil.parser.parse(monkey_json['keepalive']) monkey_json['keepalive'] = dateutil.parser.parse(monkey_json['keepalive'])
else: else: