diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-07-05 15:19:00 +0100 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-07-09 20:48:09 +0000 |
commit | 639e9054efa3a084ece3183523d9cfb494e82892 (patch) | |
tree | 4080954e6c78829c7927af2e3faa0ed48b58ca2b | |
parent | db694dc1ed0f65342426b77fb875e6c13bd5c96a (diff) | |
download | buildstream-639e9054efa3a084ece3183523d9cfb494e82892.tar.gz |
_plugincontext: simplify if statement
Add shortened local vars to make this statement easier to read and fit
onto one line.
-rw-r--r-- | src/buildstream/_plugincontext.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/buildstream/_plugincontext.py b/src/buildstream/_plugincontext.py index 7a5407cf6..9145b3a3b 100644 --- a/src/buildstream/_plugincontext.py +++ b/src/buildstream/_plugincontext.py @@ -217,9 +217,10 @@ class PluginContext(): # Now assert BuildStream version bst_major, bst_minor = utils.get_bst_version() - if bst_major < plugin_type.BST_REQUIRED_VERSION_MAJOR or \ - (bst_major == plugin_type.BST_REQUIRED_VERSION_MAJOR and - bst_minor < plugin_type.BST_REQUIRED_VERSION_MINOR): + req_major = plugin_type.BST_REQUIRED_VERSION_MAJOR + req_minor = plugin_type.BST_REQUIRED_VERSION_MINOR + + if (bst_major, bst_minor) < (req_major, req_minor): raise PluginError("BuildStream {}.{} is too old for {} plugin '{}' (requires {}.{})" .format( bst_major, bst_minor, |