File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 22# tls-scan - lib: REST API
33# https://github.com/ArtiomL/tls-scan
44# Artiom Lichtenstein
5- # v0.0.3, 13 /11/2016
5+ # v0.0.4, 14 /11/2016
66
77import json
88import log
1111
1212__author__ = 'Artiom Lichtenstein'
1313__license__ = 'MIT'
14- __version__ = '0.0.3 '
14+ __version__ = '0.0.4 '
1515
1616# SSL Labs REST API
1717class clsSAPI (object ):
@@ -35,8 +35,10 @@ def funAnalyze(self, strHost):
3535 while True :
3636 try :
3737 objHResp = self .objHS .get (self .strAPIE + self .strAnalyze + strHost + self .strAnStNew )
38- if objHResp .status_code == 429 :
39- # Request rate too high
38+ if objHResp .status_code in [429 , 503 , 529 ]:
39+ # 429 - client request rate too high or too many new assessments too fast
40+ # 503 - the service is not available (e.g. down for maintenance)
41+ # 529 - the service is overloaded
4042 intSleep += 1
4143 log .funLog (2 , 'Request rate too high! Sleeping for %s seconds.' % str (intSleep ))
4244 time .sleep (intSleep )
You can’t perform that action at this time.
0 commit comments