diff --git a/gallery_dl/cookies.py b/gallery_dl/cookies.py index e2a7e484..3d715a77 100644 --- a/gallery_dl/cookies.py +++ b/gallery_dl/cookies.py @@ -793,7 +793,8 @@ class DatabaseCopy(): def __init__(self, path): self.path = path - self.directory = self.database = None + self.database = None + self.directory = None def __enter__(self): try: diff --git a/gallery_dl/path.py b/gallery_dl/path.py index 3b360e99..a14562ab 100644 --- a/gallery_dl/path.py +++ b/gallery_dl/path.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2021-2022 Mike Fährmann +# Copyright 2021-2023 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -73,10 +73,15 @@ class PathFormat(): raise exception.DirectoryFormatError(exc) self.kwdict = {} - self.directory = self.realdirectory = \ - self.filename = self.extension = self.prefix = \ - self.path = self.realpath = self.temppath = "" self.delete = False + self.prefix = "" + self.filename = "" + self.extension = "" + self.directory = "" + self.realdirectory = "" + self.path = "" + self.realpath = "" + self.temppath = "" extension_map = config("extension-map") if extension_map is None: diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 110d4b8b..538570de 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -737,7 +737,8 @@ class RangePredicate(): self.lower = min(r.start for r in ranges) self.upper = max(r.stop for r in ranges) - 1 else: - self.lower = self.upper = 0 + self.lower = 0 + self.upper = 0 def __call__(self, _url, _kwdict): self.index = index = self.index + 1