1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

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

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()