示例#1
0
def urlretrieve(*largs, **kwargs):
    for i in range(5):
        try:
            return pyurlretrieve(*largs, **kwargs)
        except IOError as e:
            print('{} failed "{}"'.format(largs[0], e))
            if i != 4:
                print('Trying again')
                sleep(10)
            else:
                raise
示例#2
0
def urlretrieve(*largs, **kwargs):
    for i in range(5):
        try:
            return pyurlretrieve(*largs, **kwargs)
        except IOError as e:
            print('{} failed "{}"'.format(largs[0], e))
            if i != 4:
                print("Trying again")
                sleep(10)
            else:
                raise
示例#3
0
def urlretrieve(*largs, **kwargs):
    for i in range(5):
        try:
            return pyurlretrieve(*largs, **kwargs)
        except IOError:
            sleep(60)
示例#4
0
def urlretrieve(*largs, **kwargs):
    for i in range(5):
        try:
            return pyurlretrieve(*largs, **kwargs)
        except IOError:
            sleep(60)