forked from openlp/openlp
PEP fixes
This commit is contained in:
parent
fc8255d658
commit
11aa69c9ac
@ -203,7 +203,7 @@ def download_file(update_object, url, file_path, sha256=None, proxy=None):
|
|||||||
while retries < CONNECTION_RETRIES:
|
while retries < CONNECTION_RETRIES:
|
||||||
try:
|
try:
|
||||||
with file_path.open('wb') as saved_file:
|
with file_path.open('wb') as saved_file:
|
||||||
response = requests.get(url, proxies=proxy, timeout=float(CONNECTION_TIMEOUT), stream=True)
|
response = requests.get(url, proxies=proxy, timeout=float(CONNECTION_TIMEOUT), stream=True)
|
||||||
if sha256:
|
if sha256:
|
||||||
hasher = hashlib.sha256()
|
hasher = hashlib.sha256()
|
||||||
# Download until finished or canceled.
|
# Download until finished or canceled.
|
||||||
|
@ -32,7 +32,7 @@ from tempfile import gettempdir
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common import clean_button_text, trace_error_handler
|
from openlp.core.common import trace_error_handler
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.httputils import DownloadWorker, download_file, get_url_file_size, get_web_page
|
from openlp.core.common.httputils import DownloadWorker, download_file, get_url_file_size, get_web_page
|
||||||
from openlp.core.common.i18n import translate
|
from openlp.core.common.i18n import translate
|
||||||
@ -435,7 +435,6 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||||||
"""
|
"""
|
||||||
Clean up the UI after the process has finished.
|
Clean up the UI after the process has finished.
|
||||||
"""
|
"""
|
||||||
complete_str = ''
|
|
||||||
if self.max_progress:
|
if self.max_progress:
|
||||||
self.progress_bar.setValue(self.progress_bar.maximum())
|
self.progress_bar.setValue(self.progress_bar.maximum())
|
||||||
if self.has_run_wizard:
|
if self.has_run_wizard:
|
||||||
|
Loading…
Reference in New Issue
Block a user