1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-06 15:43:39 +02:00

added some exception handling stuff to checkRevision() (thanks darix for the tip)

This commit is contained in:
Marcus Hüwe
2007-07-06 15:54:10 +00:00
parent 644f8695de
commit 44dd39c0c2

View File

@@ -1640,7 +1640,14 @@ def checkRevision(prj, pac, revision):
"""
check if revision is valid revision
"""
if int(revision) > int(show_upstream_rev(conf.config['apiurl'], prj, pac)):
try:
if int(revision) > int(show_upstream_rev(conf.config['apiurl'], prj, pac)):
return False
else:
return True
except ValueError, ee:
print >>sys.stderr, ee
return False
except TypeError, ee:
print >>sys.stderr, ee
return False
else:
return True