summaryrefslogtreecommitdiffstats
path: root/dovetail/parser.py
diff options
context:
space:
mode:
authorLinghui Zeng <linghui.zeng@huawei.com>2016-11-14 10:29:21 +0800
committerLinghui Zeng <linghui.zeng@huawei.com>2016-11-15 12:35:55 +0000
commitb90fc8907f0c4ba716d6332159f881f880965277 (patch)
treeef45a29df64a4d401c796e6da6ede3c5f857af00 /dovetail/parser.py
parent64b221bee631cf52bf6a1109c16f9544eff58f80 (diff)
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 <linghui.zeng@huawei.com>
Diffstat (limited to 'dovetail/parser.py')
-rw-r--r--dovetail/parser.py4
1 files changed, 2 insertions, 2 deletions
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)