Revision ece5581b snf-cyclades-app/synnefo/api/servers.py

b/snf-cyclades-app/synnefo/api/servers.py
407 407
    vm = util.get_vm(server_id, request.user_uniq, for_update=True,
408 408
                     non_deleted=True, non_suspended=True)
409 409

  
410
    try:
411
        action = req.keys()[0]
412
    except KeyError:
413
        raise faults.BadRequest("Unknown action")
410
    action = req.keys()[0]
414 411

  
415 412
    if key_to_action(action) not in [x[0] for x in VirtualMachine.ACTIONS]:
416 413
        if action not in ARBITRARY_ACTIONS:

Also available in: Unified diff