summaryrefslogtreecommitdiffstats
path: root/qtip/loader/yaml_file.py
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-02-05 12:24:30 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-02-15 07:03:25 +0800
commitcdb8e1be12b724e9f68c7e46c9a653ec37c502cb (patch)
tree647fb60a48282deab3387deb493a1b3200aa6d96 /qtip/loader/yaml_file.py
parent0f3ad6f2db26fb91190e47c89f77fb59b7601b84 (diff)
Implement logfile collector and grep parser
JIRA: QTIP-207 JIRA: QTIP-208 Change-Id: Icc14d3097fb305e59df716636ef87504490c9d1b Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip/loader/yaml_file.py')
-rw-r--r--qtip/loader/yaml_file.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qtip/loader/yaml_file.py b/qtip/loader/yaml_file.py
index ccaee8db..8b78a47c 100644
--- a/qtip/loader/yaml_file.py
+++ b/qtip/loader/yaml_file.py
@@ -20,9 +20,11 @@ class YamlFileLoader(FileLoader):
def __init__(self, name, paths=None):
super(YamlFileLoader, self).__init__(name, paths)
- with open(self._abspath, 'r') as stream:
+ abspath = self.abspath
+
+ with open(abspath, 'r') as stream:
content = yaml.safe_load(stream)
if not isinstance(content, dict):
- raise InvalidContent(self._abspath)
+ raise InvalidContent(abspath)
self.content = content
self.name = content.get(BaseProp.NAME, path.splitext(name)[0])