From c2b0cec6e3cfa7b5ebd9762abca9179581d8722e Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Wed, 9 Jul 2014 13:40:12 -0400 Subject: Create message variables for exceptions Instead of inline messages, let's create variables instead, as it's easier to find strings, and mark them for translation. Change-Id: Ibbcfdbc59d12a0cb4af50f73043d3ff7f3c76f99 --- openstackclient/network/v2/network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openstackclient/network') diff --git a/openstackclient/network/v2/network.py b/openstackclient/network/v2/network.py index c0c25e71..f119b581 100644 --- a/openstackclient/network/v2/network.py +++ b/openstackclient/network/v2/network.py @@ -206,7 +206,8 @@ class SetNetwork(command.Command): if parsed_args.shared is not None: body['shared'] = parsed_args.shared if body == {}: - raise exceptions.CommandError("Nothing specified to be set") + msg = "Nothing specified to be set" + raise exceptions.CommandError(msg) update_method = getattr(client, "update_network") update_method(_id, {'network': body}) return -- cgit v1.2.1