summaryrefslogtreecommitdiffstats
path: root/qtip/loader/yaml_file.py
diff options
context:
space:
mode:
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])