mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -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:
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user