From 278aa29ce19c57eb6c47a4750f2367220c4688c8 Mon Sep 17 00:00:00 2001 From: zhufl Date: Wed, 9 Jan 2019 16:52:52 +0800 Subject: [PATCH] Fix missing print format error Missing print format will cause 'ValueError: unsupported format character' error, this is to fix it. Change-Id: I3b3d77e259d2c0326870383c7f51b42876d831ed --- octavia/api/handlers/controller_simulator/handler.py | 2 +- octavia/common/exceptions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/octavia/api/handlers/controller_simulator/handler.py b/octavia/api/handlers/controller_simulator/handler.py index 71e00d66f5..8ad1a1f513 100644 --- a/octavia/api/handlers/controller_simulator/handler.py +++ b/octavia/api/handlers/controller_simulator/handler.py @@ -297,7 +297,7 @@ def simulate_controller(data_model, delete=False, update=False, create=False, class InvalidHandlerInputObject(Exception): - message = "Invalid Input Object %(obj_type)" + message = "Invalid Input Object %(obj_type)s" def __init__(self, **kwargs): message = self.message % kwargs diff --git a/octavia/common/exceptions.py b/octavia/common/exceptions.py index 563db04033..8ec7569da3 100644 --- a/octavia/common/exceptions.py +++ b/octavia/common/exceptions.py @@ -103,7 +103,7 @@ class L7RuleValidation(APIException): class SingleCreateDetailsMissing(APIException): - msg = _("Missing details for %(type)s object: %(name)") + msg = _("Missing details for %(type)s object: %(name)s") code = 400