]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
changes log level to debug for help calls
authorMatthew Thode <mthode@mthode.org>
Wed, 6 May 2015 19:39:20 +0000 (14:39 -0500)
committerMatthew Thode <mthode@mthode.org>
Wed, 6 May 2015 19:39:20 +0000 (14:39 -0500)
Calling help typically causes the program being called to exit non-zero.
This causes the command to be logged as an error even though it should not be.
By setting 'log_fail_as_error=False' we log to debug.  This helps clean
up logs.

Change-Id: I13f9488b9bc524bb85047e9b2dcf4e8a76bd6c11
Closes-Bug: 1452425

neutron/agent/linux/ip_lib.py

index 943fd543cb3523d7a97a49514743a25476f556fa..9cbd5e7a26497ba40363f0bdafd64b6cc581406d 100644 (file)
@@ -673,7 +673,7 @@ def ensure_device_is_ready(device_name, namespace=None):
 def iproute_arg_supported(command, arg):
     command += ['help']
     stdout, stderr = utils.execute(command, check_exit_code=False,
-                                   return_stderr=True)
+                                   return_stderr=True, log_fail_as_error=False)
     return any(arg in line for line in stderr.split('\n'))