Added small pause before connection retry

This commit is contained in:
Tomas Groth 2014-11-24 19:38:15 +00:00
parent 0af6dc8eea
commit 5b794e5762
2 changed files with 5 additions and 0 deletions

View File

@ -326,6 +326,7 @@ class FirstTimeForm(QtGui.QWizard, UiFirstTimeWizard, RegistryProperties):
return False
else:
retries += 1
time.sleep(0.1)
continue
break
# Delete file if cancelled, it may be a partial file.
@ -361,6 +362,7 @@ class FirstTimeForm(QtGui.QWizard, UiFirstTimeWizard, RegistryProperties):
raise
else:
retries += 1
time.sleep(0.1)
continue
def _download_progress(self, count, block_size):

View File

@ -35,6 +35,7 @@ import logging
import locale
import os
import re
import time
from subprocess import Popen, PIPE
import sys
import urllib.request
@ -261,6 +262,7 @@ def check_latest_version(current_version):
log.exception('Failed to download the latest OpenLP version file')
else:
retries += 1
time.sleep(0.1)
continue
break
if remote_version:
@ -408,6 +410,7 @@ def get_web_page(url, header=None, update_openlp=False):
log.exception('The web page could not be downloaded')
raise
else:
time.sleep(0.1)
continue
break
if not page: