@gen.coroutine
def UpdateDevice(client, obj_store, user_id, device_id, request):
 device_dict = request['device_dict']
 if (device_dict.has_key('device_id') and (device_dict['device_id'] != device_id)):
  raise web.HTTPError(400, ('bad auth cookie; device id mismatch %d != %d' % (device_dict['device_id'], device_id)))
 request['user_id'] = user_id
 request['device_id'] = device_id
 (yield gen.Task(Operation.CreateAndExecute, client, user_id, device_id, 'Device.UpdateOperation', request))
 logging.info(('UPDATE DEVICE: user: %d, device: %d' % (user_id, device_id)))
 raise gen.Return({})

@ gen . coroutine def UpdateDevice ( client , obj_store , user_id , device_id , request ) : device_dict = request [ 'device_dict' ] if ( device_dict . has_key ( 'device_id' ) and ( device_dict [ 'device_id' ] != device_id ) ) : raise web . HTTPError ( 400 , ( 'bad auth cookie; device id mismatch %d != %d' % ( device_dict [ 'device_id' ] , device_id ) ) ) request [ 'user_id' ] = user_id request [ 'device_id' ] = device_id ( yield gen . Task ( Operation . CreateAndExecute , client , user_id , device_id , 'Device.UpdateOperation' , request ) ) logging . info ( ( 'UPDATE DEVICE: user: %d, device: %d' % ( user_id , device_id ) ) ) raise gen . Return ( { } )
updates the device metadata .