summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2017-08-10 08:23:20 +0200
committerJürg Billeter <j@bitron.ch>2017-08-10 08:23:20 +0200
commit67af5967041242a0392192aad285fbad6d0b44bb (patch)
treedf72d53d5253f9ee6a9f235cf7eabeaf6711dd24 /setup.py
parent8260d0f5086bce840b1cb52c1675ac6038dc7224 (diff)
downloadbuildstream-67af5967041242a0392192aad285fbad6d0b44bb.tar.gz
setup.py: Catch exception with OSTree < 2017.4
Fixes #58
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index 7fc8b6746..80b367cae 100755
--- a/setup.py
+++ b/setup.py
@@ -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.")
###########################################