mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-22 01:02:17 -05:00
checkdeadlinks: Return 0 on no-deadlink, 1 on deadlinks.
This commit is contained in:
parent
52e64d545b
commit
3acdb8f2d1
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user