sleep 1 sec before retrying after http 500 error

git-svn-id: http://comictagger.googlecode.com/svn/trunk@611 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville 2013-04-21 06:51:43 +00:00
parent 9c14258e9f
commit 4098802e43

View File

@ -24,6 +24,7 @@ from pprint import pprint
import urllib2, urllib
import math
import re
import time
import datetime
import ctversion
import sys
@ -117,6 +118,7 @@ class ComicVineTalker(QObject):
except urllib2.HTTPError as e:
if e.getcode() == 500:
self.writeLog( "Try #{0}: ".format(tries+1) )
time.sleep(1)
self.writeLog( str(e) + "\n" )
if e.getcode() != 500: