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 <liu.xuefeng1@zte.com.cn>
Change-Id: I62a2cb9687e983d70b855c9095592547ca9e7362
Closes-Bug: #1706885
This commit is contained in:
jonnary 2017-07-28 00:08:35 +08:00 committed by Christopher Brown
parent 734c10829f
commit 52a12103c0

View File

@ -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',