diff --git a/compareRels.py b/compareRels.py index bef6838..279f47a 100644 --- a/compareRels.py +++ b/compareRels.py @@ -59,7 +59,10 @@ def cmp_rel (url): v = get (url) except Exception as e: sys.stderr.write ("Could not get:" + url + ". Exception:" + str(e) + "\n") - print (url+';'+str(v['ahead_by'])+';'+str(v['behind_by'])) + if 'ahead_by' in v and 'behind_by' in v: + print (url+';'+str(v['ahead_by'])+';'+str(v['behind_by'])) + else: + sys.stderr.write ("Could not compare releases for: " + url + "; There exists no common ancestor between the two versions." + "\n") p2r = {}