summaryrefslogtreecommitdiff
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
commitf5b99559ef7df91fe11f6b97be66c96b81911152 (patch)
treea13969542dc5b577646b18d11da3d4293001566a
parenta8c31ff3729e96529ee71c80dcbe44f5ff56b590 (diff)
downloadbuildstream-f5b99559ef7df91fe11f6b97be66c96b81911152.tar.gz
buildstream/plugin.py: Fixing unused variables
-rw-r--r--buildstream/plugin.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/buildstream/plugin.py b/buildstream/plugin.py
index 06c903191..b208e2d06 100644
--- a/buildstream/plugin.py
+++ b/buildstream/plugin.py
@@ -695,13 +695,8 @@ __PLUGINS_TABLE = WeakValueDictionary()
# (Plugin): The plugin for the given ID, or None
#
def _plugin_lookup(unique_id):
- try:
- plugin = __PLUGINS_TABLE[unique_id]
- except (AttributeError, KeyError) as e:
- print("Could not find plugin with ID {}".format(unique_id))
- raise
-
- return plugin
+ assert unique_id in __PLUGINS_TABLE, "Could not find plugin with ID {}".format(unique_id)
+ return __PLUGINS_TABLE[unique_id]
# No need for unregister, WeakValueDictionary() will remove entries