fix some smaller stuff

- remove support for old windows config paths
- catch exception if cache-database can't be opened
- fix username/password settings for unit tests
- rename variable 'max_tries' to 'retries'
This commit is contained in:
Mike Fährmann
2017-03-27 13:22:02 +02:00
parent e4b3077168
commit e3212dd98f
4 changed files with 6 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ from .. import config
class Downloader(BasicDownloader):
max_tries = config.interpolate(("downloader", "http", "retries",), 5)
retries = config.interpolate(("downloader", "http", "retries",), 5)
timeout = config.interpolate(("downloader", "http", "timeout",), None)
def __init__(self, output):
@@ -32,8 +32,8 @@ class Downloader(BasicDownloader):
while True:
tries += 1
if tries > 1:
self.out.error(pathfmt.path, msg, tries-1, self.max_tries)
if tries > self.max_tries:
self.out.error(pathfmt.path, msg, tries-1, self.retries)
if tries > self.retries:
return
time.sleep(1)