diff options
author | Jürg Billeter <j@bitron.ch> | 2017-08-10 08:23:20 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-08-10 08:23:20 +0200 |
commit | 67af5967041242a0392192aad285fbad6d0b44bb (patch) | |
tree | df72d53d5253f9ee6a9f235cf7eabeaf6711dd24 /setup.py | |
parent | 8260d0f5086bce840b1cb52c1675ac6038dc7224 (diff) | |
download | buildstream-67af5967041242a0392192aad285fbad6d0b44bb.tar.gz |
setup.py: Catch exception with OSTree < 2017.4
Fixes #58
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -69,11 +69,14 @@ try: except: exit_ostree("OSTree not found") -if OSTree.YEAR_VERSION < REQUIRED_OSTREE_YEAR or \ - (OSTree.YEAR_VERSION == REQUIRED_OSTREE_YEAR and - OSTree.RELEASE_VERSION < REQUIRED_OSTREE_RELEASE): - exit_ostree("OSTree v{}.{} is too old." - .format(OSTree.YEAR_VERSION, OSTree.RELEASE_VERSION)) +try: + if OSTree.YEAR_VERSION < REQUIRED_OSTREE_YEAR or \ + (OSTree.YEAR_VERSION == REQUIRED_OSTREE_YEAR and + OSTree.RELEASE_VERSION < REQUIRED_OSTREE_RELEASE): + exit_ostree("OSTree v{}.{} is too old." + .format(OSTree.YEAR_VERSION, OSTree.RELEASE_VERSION)) +except AttributeError: + exit_ostree("OSTree is too old.") ########################################### |