diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-12-11 17:45:46 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-12-11 17:45:46 +0000 |
| commit | 83b104ad87f72f2e7323de9b2617df0e25e870a5 (patch) | |
| tree | 57ab1d09d681b8686dfffc5e4dd2cce1a7d3f48c | |
| parent | 78bbc71bc3a10048e158be6757bf44f2a685458d (diff) | |
| parent | c454606ada3990f174536a4dcb361620efb76d0f (diff) | |
Merge "i18n raise Exception messages"
| -rwxr-xr-x | bin/nova-manage | 9 | ||||
| -rwxr-xr-x | bin/nova-novncproxy | 4 | ||||
| -rw-r--r-- | nova/network/quantumv2/api.py | 2 | ||||
| -rwxr-xr-x | tools/db/schema_diff.py | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 7121c6f50..1d2e297d2 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -523,15 +523,16 @@ class NetworkCommands(object): """Deletes a network""" if fixed_range is None and uuid is None: - raise Exception("Please specify either fixed_range or uuid") + raise Exception(_("Please specify either fixed_range or uuid")) net_manager = importutils.import_object(CONF.network_manager) if "QuantumManager" in CONF.network_manager: if uuid is None: - raise Exception("UUID is required to delete Quantum Networks") + raise Exception(_("UUID is required to delete " + "Quantum Networks")) if fixed_range: - raise Exception("Deleting by fixed_range is not supported " - "with the QuantumManager") + raise Exception(_("Deleting by fixed_range is not supported " + "with the QuantumManager")) # delete the network net_manager.delete_network(context.get_admin_context(), fixed_range, uuid) diff --git a/bin/nova-novncproxy b/bin/nova-novncproxy index e774c01ed..6c911af1e 100755 --- a/bin/nova-novncproxy +++ b/bin/nova-novncproxy @@ -91,7 +91,7 @@ class NovaWebSocketProxy(websockify.WebSocketProxy): if not connect_info: LOG.audit("Invalid Token: %s", token) - raise Exception("Invalid Token") + raise Exception(_("Invalid Token")) host = connect_info['host'] port = int(connect_info['port']) @@ -110,7 +110,7 @@ class NovaWebSocketProxy(websockify.WebSocketProxy): if data.find("\r\n\r\n") != -1: if not data.split("\r\n")[0].find("200"): LOG.audit("Invalid Connection Info %s", token) - raise Exception("Invalid Connection Info") + raise Exception(_("Invalid Connection Info")) tsock.recv(len(data)) break diff --git a/nova/network/quantumv2/api.py b/nova/network/quantumv2/api.py index 8c802b9fc..8a049512e 100644 --- a/nova/network/quantumv2/api.py +++ b/nova/network/quantumv2/api.py @@ -147,7 +147,7 @@ class API(base.Base): for port_id in touched_port_ids: port_in_server = quantum.show_port(port_id).get('port') if not port_in_server: - raise Exception('Port have already lost') + raise Exception(_('Port not found')) port_req_body = {'port': {'device_id': None}} quantum.update_port(port_id, port_req_body) diff --git a/tools/db/schema_diff.py b/tools/db/schema_diff.py index 873f20543..a4bcfeaa8 100755 --- a/tools/db/schema_diff.py +++ b/tools/db/schema_diff.py @@ -107,7 +107,7 @@ def _get_db_driver_class(db_type): elif db_type == "postgres": return Postgres else: - raise Exception("database %s not supported" % db_type) + raise Exception(_("database %s not supported") % db_type) ### Migrate |
