minor edits

This commit is contained in:
Philip Ridout 2017-09-06 21:18:08 +01:00
parent 9cb2b2e3c2
commit 292861907e
3 changed files with 3 additions and 4 deletions

View File

@ -29,7 +29,6 @@ import sys
from openlp.core.common import Settings, is_win, is_macosx
from openlp.core.common.path import Path
if not is_win() and not is_macosx():
try:
from xdg import BaseDirectory

View File

@ -218,10 +218,10 @@ def url_get_file(callback, url, f_path, sha256=None):
block_size = 4096
retries = 0
log.debug("url_get_file: " + url)
if sha256:
hasher = hashlib.sha256()
while True:
try:
if sha256:
hasher = hashlib.sha256()
with f_path.open('wb') as file:
url_file = urllib.request.urlopen(url, timeout=CONNECTION_TIMEOUT)
# Download until finished or canceled.

View File

@ -141,7 +141,7 @@ class LanguageManager(object):
if reg_ex.exactMatch(qmf):
name = '{regex}'.format(regex=reg_ex.cap(1))
LanguageManager.__qm_list__[
'{count:>2i} {name}'.format(count=counter + 1, name=LanguageManager.language_name(qmf))] = name
'{count:>2d} {name}'.format(count=counter + 1, name=LanguageManager.language_name(qmf))] = name
@staticmethod
def get_qm_list():