From 52a12103c0b11f6c16186ac455c32852583d021c Mon Sep 17 00:00:00 2001 From: jonnary Date: Fri, 28 Jul 2017 00:08:35 +0800 Subject: [PATCH] fixes support for osprofiler The following unit test test_shell.ShellTest.test_do_add_profiler_args is broken and errors with testtools.matchers._impl.MismatchError: 0 != 1 This commit fixes compatibility with osprofiler Co-Authored-By: XueFeng Liu Change-Id: I62a2cb9687e983d70b855c9095592547ca9e7362 Closes-Bug: #1706885 --- senlinclient/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/senlinclient/shell.py b/senlinclient/shell.py index 057fb6c1..4745ef5b 100644 --- a/senlinclient/shell.py +++ b/senlinclient/shell.py @@ -99,7 +99,7 @@ class SenlinShell(object): print(' '.join(commands | options)) def add_profiler_args(self, parser): - if osprofiler_profiler: + if isinstance(osprofiler_profiler, int): parser.add_argument( '--os-profile', metavar='HMAC_KEY',