Removes device specified by id

def remove_device(self, request):
        """Removes device specified by id"""
        
        devices = self.__get_u2f_devices()

        for i in range(len(devices)):
            if devices[i]['keyHandle'] == request['id']:
                del devices[i]
                self.__save_u2f_devices(devices)
                
                return {
                    'status'  : 'ok', 
                    'message' : 'Successfully deleted your device!'
                }

        return {
            'status' : 'failed', 
            'error'  : 'No device with such an id been found!'
        }