From 72add78e9df9c9daff1fc6bbd5451c3db22af713 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Tue, 31 Jan 2023 10:19:24 +0100 Subject: [PATCH] Fix errors found by pylint Signed-off-by: Benjamin Drung --- import-bug-from-debian | 2 +- ubuntutools/archive.py | 7 +++++-- ubuntutools/pullpkg.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/import-bug-from-debian b/import-bug-from-debian index 9a74f7a..d5313cc 100755 --- a/import-bug-from-debian +++ b/import-bug-from-debian @@ -104,7 +104,7 @@ def main(): bug_num = int(bug_num) bug_nums.append(bug_num) - bugs = debianbts.get_status(*bug_nums) + bugs = debianbts.get_status(bug_nums) if not bugs: Logger.error("Cannot find any of the listed bugs") diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index 1b593c7..25d9baa 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -39,7 +39,8 @@ import tempfile from abc import ABC, abstractmethod from contextlib import closing from pathlib import Path -from urllib.request import urljoin, urlopen, urlparse +from urllib.parse import urljoin, urlparse +from urllib.request import urlopen import debian.deb822 from debian.changelog import Changelog @@ -1046,6 +1047,7 @@ Snapshot = _Snapshot() class SnapshotPackage(object): def __init__(self, obj): + self.name = None self._obj = obj self._files = None self._component = None @@ -1206,7 +1208,7 @@ class SnapshotFile(object): elif "first_seen" in self._obj: return self._obj["first_seen"] else: - Logger.error("File {} has no date information", self.name) + Logger.error("File %s has no date information", self.name) return "unknown" def getHash(self): @@ -1255,6 +1257,7 @@ class SnapshotSPPH(object): def __init__(self, snapshot_pkg): self._pkg = snapshot_pkg + self._changelog = None # LP API defined fields diff --git a/ubuntutools/pullpkg.py b/ubuntutools/pullpkg.py index 43f57d6..a4291e6 100644 --- a/ubuntutools/pullpkg.py +++ b/ubuntutools/pullpkg.py @@ -433,7 +433,7 @@ class PullPkg(object): if options["upload_queue"]: # upload queue API is different/simpler - self.pull_upload_queue( + self.pull_upload_queue( # pylint: disable=missing-kwoa pull, arch=options["arch"], download_only=options["download_only"], **params ) return