Fix errors found by pylint

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
This commit is contained in:
Benjamin Drung 2023-01-31 10:19:24 +01:00
parent ab64467f33
commit 72add78e9d
3 changed files with 7 additions and 4 deletions

View File

@ -104,7 +104,7 @@ def main():
bug_num = int(bug_num) bug_num = int(bug_num)
bug_nums.append(bug_num) bug_nums.append(bug_num)
bugs = debianbts.get_status(*bug_nums) bugs = debianbts.get_status(bug_nums)
if not bugs: if not bugs:
Logger.error("Cannot find any of the listed bugs") Logger.error("Cannot find any of the listed bugs")

View File

@ -39,7 +39,8 @@ import tempfile
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from contextlib import closing from contextlib import closing
from pathlib import Path 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 import debian.deb822
from debian.changelog import Changelog from debian.changelog import Changelog
@ -1046,6 +1047,7 @@ Snapshot = _Snapshot()
class SnapshotPackage(object): class SnapshotPackage(object):
def __init__(self, obj): def __init__(self, obj):
self.name = None
self._obj = obj self._obj = obj
self._files = None self._files = None
self._component = None self._component = None
@ -1206,7 +1208,7 @@ class SnapshotFile(object):
elif "first_seen" in self._obj: elif "first_seen" in self._obj:
return self._obj["first_seen"] return self._obj["first_seen"]
else: else:
Logger.error("File {} has no date information", self.name) Logger.error("File %s has no date information", self.name)
return "unknown" return "unknown"
def getHash(self): def getHash(self):
@ -1255,6 +1257,7 @@ class SnapshotSPPH(object):
def __init__(self, snapshot_pkg): def __init__(self, snapshot_pkg):
self._pkg = snapshot_pkg self._pkg = snapshot_pkg
self._changelog = None
# LP API defined fields # LP API defined fields

View File

@ -433,7 +433,7 @@ class PullPkg(object):
if options["upload_queue"]: if options["upload_queue"]:
# upload queue API is different/simpler # 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 pull, arch=options["arch"], download_only=options["download_only"], **params
) )
return return