From b90fc8907f0c4ba716d6332159f881f880965277 Mon Sep 17 00:00:00 2001 From: Linghui Zeng Date: Mon, 14 Nov 2016 10:29:21 +0800 Subject: dovetail tool: replace the hard-coded "Tescase" and modify some classmethod JIRA: DOVETAIL-45 1. In the testcase.py file, we replace the hard-coded "Tesecase" with "cls" or "self" based on the specific contexts. 2. For all the four committed files, we modify some classmethod into staticmethod because each method is basically just a function, called syntactically like a method, but without access to the object and its' internals (attributes and other methods). Change-Id: Ieb452f476a2d33ae9aca4c904ae7d2c92b68689e Signed-off-by: Linghui Zeng --- dovetail/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dovetail/parser.py') diff --git a/dovetail/parser.py b/dovetail/parser.py index a9edb36e..621d20a3 100644 --- a/dovetail/parser.py +++ b/dovetail/parser.py @@ -20,8 +20,8 @@ logger = dt_logger.Logger('parser.py').getLogger() class Parser: '''preprocess configuration files''' - @classmethod - def parse_cmd(cls, cmd, testcase): + @staticmethod + def parse_cmd(cmd, testcase): cmd_lines = None try: template = jinja2.Template(cmd, undefined=jinja2.StrictUndefined) -- cgit 1.2.3-korg