forked from openlp/openlp
minor edits
This commit is contained in:
parent
9cb2b2e3c2
commit
292861907e
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user