def modify_user(self, uid, access_key=None, secret_key=None, admin=None): """Modify an existing user""" if not access_key and not secret_key and admin is None: return values = {} if access_key: values['access_key'] = access_key if secret_key: values['secret_key'] = secret_key if admin is not None: values['is_admin'] = admin db.user_update(context.get_admin_context(), uid, values)