diff --git a/obis/src/python/obis/dm/git.py b/obis/src/python/obis/dm/git.py
index 7c406ceb6e6edbf724d0ea7d5dd33a7fd1e049bf..fe8248a9fccba8b702d6e475eefde7627aa7a5e2 100644
--- a/obis/src/python/obis/dm/git.py
+++ b/obis/src/python/obis/dm/git.py
@@ -44,7 +44,11 @@ class GitWrapper(object):
             first_line = result.output.split("\n")[0].split(":")
             if len(first_line) > 1:
                 self.annex_version = first_line[1].strip()
-                self.annex_major_version = int(self.annex_version.split(".")[0])
+                try:
+                    self.annex_major_version = int(self.annex_version.split(".")[0])
+                except Exception as e:
+                    print("Invalid git-annex version line:",result.output)
+                    return false
         return True
 
     def git_init(self):