From d37652e0848e4d4a3e06c544c8857aff0d728bbc Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 22 Jul 2020 13:15:38 -0500 Subject: http-api: remove unneeded check for VyOSError The only calls to config (return_value, return_values, exists) do not throw VyOSError; remove unneeded except. --- src/services/vyos-http-api-server | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index 4c41fa96d..d5730d86c 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -32,7 +32,6 @@ from waitress import serve from functools import wraps from vyos.configsession import ConfigSession, ConfigSessionError -from vyos.config import VyOSError DEFAULT_CONFIG_FILE = '/etc/vyos/http-api.conf' @@ -231,8 +230,6 @@ def retrieve_op(command): return error(400, "\"{0}\" is not a valid config format".format(config_format)) else: return error(400, "\"{0}\" is not a valid operation".format(op)) - except VyOSError as e: - return error(400, str(e)) except ConfigSessionError as e: return error(400, str(e)) except Exception as e: -- cgit v1.2.3