mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
Mute pylint false-positive errors related to rpm
This commit is contained in:
parent
64aefffc87
commit
987db92f3b
@ -26,6 +26,7 @@ from .util.packagequery import PackageError
|
||||
|
||||
try:
|
||||
# import as RPMError because the class "error" is too generic
|
||||
# pylint: disable=E0611
|
||||
from rpm import error as RPMError
|
||||
except:
|
||||
# if rpm-python isn't installed (we might be on a debian system):
|
||||
|
@ -19,6 +19,7 @@ class Checker:
|
||||
import rpm
|
||||
self.dbdir = mkdtemp(prefix='oscrpmdb')
|
||||
self.imported = {}
|
||||
# pylint: disable=E1101
|
||||
rpm.addMacro('_dbpath', self.dbdir)
|
||||
self.ts = rpm.TransactionSet()
|
||||
self.ts.initDB()
|
||||
@ -29,6 +30,7 @@ class Checker:
|
||||
def readkeys(self, keys=None):
|
||||
import rpm
|
||||
keys = keys or []
|
||||
# pylint: disable=E1101
|
||||
rpm.addMacro('_dbpath', self.dbdir)
|
||||
for key in keys:
|
||||
try:
|
||||
@ -40,6 +42,7 @@ class Checker:
|
||||
raise KeyError('', "no key imported")
|
||||
|
||||
import rpm
|
||||
# pylint: disable=E1101
|
||||
rpm.delMacro("_dbpath")
|
||||
|
||||
# python is an idiot
|
||||
|
Loading…
Reference in New Issue
Block a user