checkdeadlinks: Return 0 on no-deadlink, 1 on deadlinks.

This commit is contained in:
Emmanuel Gil Peyrot 2016-10-03 22:25:16 +01:00
parent 52e64d545b
commit 3acdb8f2d1
1 changed files with 2 additions and 4 deletions

View File

@ -81,16 +81,14 @@ def main():
except Exception, e:
reason = str(e)
if verbose:
print "DEAD"
else:
print "XEP-" + xepnum + " - DEAD: " + url + " [" + reason + "]"
deadlinks = deadlinks + 1
else:
if verbose:
print 'OK'
#if deadlinks = 0:
#print "all http/https links are good"
if deadlinks > 0:
sys.exit(1)
if __name__ == "__main__":
main()