X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vstf%2Fvstf%2Fcommon%2Futils.py;h=f2e14096dce2fed8c4f918054b747cbff2414da0;hb=6d9521fff519412e66d585d8f980824414a218eb;hp=542eaa8855a4c9178ecf351719307a7e82b59a31;hpb=9bd22008562f748f82a3053f53a969027876a852;p=bottlenecks.git diff --git a/vstf/vstf/common/utils.py b/vstf/vstf/common/utils.py index 542eaa88..f2e14096 100755 --- a/vstf/vstf/common/utils.py +++ b/vstf/vstf/common/utils.py @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + import re import logging import subprocess @@ -13,10 +22,10 @@ LOG = logging.getLogger(__name__) def info(): def _deco(func): def __deco(*args, **kwargs): - if "shell" in kwargs and not kwargs["shell"]: - LOG.info(' '.join(args[0])) - else: + if "shell" in kwargs and kwargs["shell"]: LOG.info(args[0]) + else: + LOG.info(' '.join(args[0])) return func(*args, **kwargs) return __deco return _deco