summaryrefslogtreecommitdiff
path: root/buildstream/_yaml.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-21 00:22:28 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-21 00:30:58 +0900
commit1f39c63ca8f18291b43ad0dd0a007e3951b0557d (patch)
tree4f72d373480907a759e9e87bbf96beb5476705c6 /buildstream/_yaml.py
parent81203b63e0cdbe3ed0b0696168a79764816b047f (diff)
downloadbuildstream-1f39c63ca8f18291b43ad0dd0a007e3951b0557d.tar.gz
Removing unneeded str() statements in "{}".format() statements
Since these changes were effected in 3b17762a4cab23c238762ca32baa348788347473, these stringifications are now implied and no longer needed.
Diffstat (limited to 'buildstream/_yaml.py')
-rw-r--r--buildstream/_yaml.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_yaml.py b/buildstream/_yaml.py
index eb6719360..6b1464272 100644
--- a/buildstream/_yaml.py
+++ b/buildstream/_yaml.py
@@ -326,7 +326,7 @@ def node_get(node, expected_type, key, indices=[], default_value=None):
provenance = node_get_provenance(node)
if value is None:
raise LoadError(LoadErrorReason.INVALID_DATA,
- "{}: Dictionary did not contain expected key '{}'".format(str(provenance), key))
+ "{}: Dictionary did not contain expected key '{}'".format(provenance, key))
path = key
if indices:
@@ -360,7 +360,7 @@ def node_get(node, expected_type, key, indices=[], default_value=None):
provenance = node_get_provenance(node, key=key, indices=indices)
raise LoadError(LoadErrorReason.INVALID_DATA,
"{}: Value of '{}' is not of the expected type '{}'"
- .format(str(provenance), path, expected_type.__name__))
+ .format(provenance, path, expected_type.__name__))
# Trim it at the bud, let all loaded strings from yaml be stripped of whitespace
if isinstance(value, str):
@@ -755,7 +755,7 @@ def composite(target, source):
except CompositeTypeError as e:
error_prefix = ""
if source_provenance:
- error_prefix = "{}: ".format(str(source_provenance))
+ error_prefix = "{}: ".format(source_provenance)
raise LoadError(LoadErrorReason.ILLEGAL_COMPOSITE,
"{}Expected '{}' type for configuration '{}', instead received '{}'"
.format(error_prefix,