1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-10-31 15:35:07 -04: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: except Exception, e:
reason = str(e) reason = str(e)
if verbose: if verbose:
print "DEAD"
else:
print "XEP-" + xepnum + " - DEAD: " + url + " [" + reason + "]" print "XEP-" + xepnum + " - DEAD: " + url + " [" + reason + "]"
deadlinks = deadlinks + 1 deadlinks = deadlinks + 1
else: else:
if verbose: if verbose:
print 'OK' print 'OK'
#if deadlinks = 0: if deadlinks > 0:
#print "all http/https links are good" sys.exit(1)
if __name__ == "__main__": if __name__ == "__main__":
main() main()