X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Fscenarios%2Fparser%2Fparser.py;h=eb16833e5c534017e3cc34bcf9445437e0b1bc91;hb=a2176af5514fc55ad8421635ad70ce4f26890ed6;hp=bb16e7c897e51ec8537b46241db34fcb668dd782;hpb=ceebb672c85c5dbce6df17f0c263375d17adcc05;p=yardstick.git diff --git a/yardstick/benchmark/scenarios/parser/parser.py b/yardstick/benchmark/scenarios/parser/parser.py index bb16e7c89..eb16833e5 100644 --- a/yardstick/benchmark/scenarios/parser/parser.py +++ b/yardstick/benchmark/scenarios/parser/parser.py @@ -6,6 +6,8 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +from __future__ import print_function +from __future__ import absolute_import import pkg_resources import logging import subprocess @@ -61,12 +63,12 @@ class Parser(base.Scenario): p = subprocess.Popen(cmd1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.communicate() - print "yangtotosca finished" + print("yangtotosca finished") result['yangtotosca'] = "success" if p.returncode == 0 else "fail" def teardown(self): - ''' for scenario teardown remove parser and pyang ''' + """ for scenario teardown remove parser and pyang """ self.teardown_script = pkg_resources.resource_filename( "yardstick.benchmark.scenarios.parser", Parser.TEARDOWN_SCRIPT) @@ -75,8 +77,9 @@ class Parser(base.Scenario): def _test(): - '''internal test function''' + """internal test function""" pass + if __name__ == '__main__': _test()