summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2018-10-23 15:51:21 +0100
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2018-10-25 15:43:52 +0100
commit5a3a537fe146129e1e6551f6689cf3d8ef4dfbbf (patch)
treeeba809936186e56679f8f8749715b0c2b1b51198
parent796bd8c9957df406116e4d08ed8129eba810d23e (diff)
downloadbuildstream-5a3a537fe146129e1e6551f6689cf3d8ef4dfbbf.tar.gz
_yaml.py: Quieten a lint in Python < 3.6
For Python before 3.6, `path.resolve()` could not take the `strict` keyword argument. Linting on such Python versions will raise an unnecessary issue given the check present. As such, quieten that lint. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-rw-r--r--buildstream/_yaml.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/buildstream/_yaml.py b/buildstream/_yaml.py
index 5fc4fec28..90784636d 100644
--- a/buildstream/_yaml.py
+++ b/buildstream/_yaml.py
@@ -470,10 +470,11 @@ def node_get_project_path(node, key, project_dir, *,
.format(provenance, path_str))
try:
+ full_path = (project_dir_path / path)
if sys.version_info[0] == 3 and sys.version_info[1] < 6:
- full_resolved_path = (project_dir_path / path).resolve()
+ full_resolved_path = full_path.resolve()
else:
- full_resolved_path = (project_dir_path / path).resolve(strict=True)
+ full_resolved_path = full_path.resolve(strict=True) # pylint: disable=unexpected-keyword-arg
except FileNotFoundError:
raise LoadError(LoadErrorReason.MISSING_FILE,
"{}: Specified path '{}' does not exist"