neutron/neutron
John Schwarz 79a237c5df Don't depend on translated strings for error check
Currently, execute() may raise an exception that contains a *translated*
string that starts with 'Exit code: %(returncode)d...' if the returncode
of a process was not 0. find_child_pids() will then check if the
raised exception contains 'Exit code: 1' (to check if the returncode is
1), but in non-English locales this will fail as the 2 strings are not
encoded the same.

This patch adds a new ProcessExecutionError (which inherits from
RuntimeError, so as to not change all the code that currently depends on
execute() returning RuntimeError) which now accepts a returncode. This
can be changed explicitly without depending on the error message.

Later patches can move ProcessExecutionError to neutron-lib, if this is
needed - this patch intends to write the smallest piece of code that can
be backported.

Closes-Bug: #1638273
Change-Id: I85d3bec13e852918eb13e73c1367c70e1f4d34b1
(cherry picked from commit 3c1bf8697b)
2016-11-02 08:17:34 +00:00
..
agent Don't depend on translated strings for error check 2016-11-02 08:17:34 +00:00
api Stop oslo_messaging from error logging CallbackNotFound 2016-09-22 02:32:29 +00:00
callbacks Fix events misnomer in callback registry debug trace 2016-09-15 18:53:27 -07:00
cmd Forbid importing neutron.tests.* from outside tests subtree 2016-09-20 01:43:19 +00:00
common Remove recursion from import_modules_recursively 2016-10-22 15:08:24 +00:00
conf DHCP: remove deprecated config dhcp_lease_time 2016-09-08 04:18:09 -07:00
core_extensions Respond negatively to tenant detachment of enforced QoS policies 2016-05-16 21:54:15 +00:00
db Fix IPv6 PD with pluggable IPAM 2016-10-19 10:27:03 +00:00
debug Replace device owners hard coded strings to neutron_lib constants 2016-07-12 04:11:35 -04:00
extensions Add required extension to trunk_details descriptor 2016-10-08 01:06:35 +00:00
hacking Forbid importing neutron.tests.* from outside tests subtree 2016-09-20 01:43:19 +00:00
ipam Merge "Catch DBReferenceError in IPAM and convert to SubnetNotFound" 2016-09-16 07:09:25 +00:00
locale Imported Translations from Zanata 2016-08-19 07:27:43 +00:00
notifiers Use singleton for Nova notifier 2016-09-09 05:12:03 -07:00
objects Extend project_id in object dicts (Newton only) 2016-10-12 02:13:42 +00:00
pecan_wsgi Merge "Make DHCP notifier use core resource events" 2016-09-14 21:11:53 +00:00
plugins Refetch subnet/network from DB in ML2 update ops 2016-09-27 01:02:28 +00:00
quota Merge "Mark quota operations as retriable" 2016-09-13 20:34:31 +00:00
scheduler Merge "Only schedule routers from drivers that need it" 2016-09-07 19:04:04 +00:00
server Revert "Revert "Remove threading before process forking"" 2016-06-02 21:26:08 +00:00
services Only emit deprecation warning when deprecated value read 2016-10-18 13:37:57 +11:00
tests Don't depend on translated strings for error check 2016-11-02 08:17:34 +00:00
__init__.py Hacking rule to check i18n usage 2016-03-30 21:28:37 -04:00
_i18n.py Move i18n to _i18n, as per oslo_i18n guidelines 2015-12-01 19:29:10 -07:00
auth.py
context.py Use context from_environ to load contexts 2016-07-12 13:49:41 +10:00
manager.py Pecan: bind attribute map to controllers 2016-05-26 06:13:53 +00:00
neutron_plugin_base_v2.py Revert "Revert "Remove threading before process forking"" 2016-06-02 21:26:08 +00:00
opts.py Include [agent] extensions option into ovs/linuxbridge agent files 2016-08-24 16:41:03 +00:00
policy.py Prevent use filter(lambda obj: test(obj), data) 2016-09-14 16:23:32 +07:00
service.py Merge "Use dispose_pool() from oslo.db" 2016-08-26 22:03:41 +00:00
version.py
worker.py Remove notification for process event 2016-06-28 11:49:31 -07:00
wsgi.py Merge "Use dispose_pool() from oslo.db" 2016-08-26 22:03:41 +00:00