summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-19 15:38:09 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-19 15:38:09 +0900
commitcb3a21491883ecea10922419ff4c9c8770cc2f85 (patch)
treedafd1df7e04782b6b3c7ace7f0a5f708d847a9e7 /buildstream
parentec2648cb2208574485978a492a9b79c2c417ee13 (diff)
downloadbuildstream-cb3a21491883ecea10922419ff4c9c8770cc2f85.tar.gz
buildstream/_options/optionpool.py: Fixing unused variables
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_options/optionpool.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/buildstream/_options/optionpool.py b/buildstream/_options/optionpool.py
index 0bb366020..70acd268e 100644
--- a/buildstream/_options/optionpool.py
+++ b/buildstream/_options/optionpool.py
@@ -97,7 +97,8 @@ class OptionPool():
except KeyError as e:
p = _yaml.node_get_provenance(node, option_name)
raise LoadError(LoadErrorReason.INVALID_DATA,
- "{}: Unknown option '{}' specified".format(p, option_name))
+ "{}: Unknown option '{}' specified"
+ .format(p, option_name)) from e
option.load_value(node, transform=transform)
# load_cli_values()
@@ -114,7 +115,8 @@ class OptionPool():
option = self._options[option_name]
except KeyError as e:
raise LoadError(LoadErrorReason.INVALID_DATA,
- "Unknown option '{}' specified on the command line".format(option_name))
+ "Unknown option '{}' specified on the command line"
+ .format(option_name)) from e
option.set_value(option_value)
# resolve()
@@ -180,7 +182,7 @@ class OptionPool():
# Now recurse into nested dictionaries and lists
# and process any indirectly nested conditionals.
#
- for key, value in _yaml.node_items(node):
+ for _, value in _yaml.node_items(node):
if isinstance(value, Mapping):
self.process_node(value)
elif isinstance(value, list):