mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 16:56:15 +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:
|
try:
|
||||||
# import as RPMError because the class "error" is too generic
|
# import as RPMError because the class "error" is too generic
|
||||||
|
# pylint: disable=E0611
|
||||||
from rpm import error as RPMError
|
from rpm import error as RPMError
|
||||||
except:
|
except:
|
||||||
# if rpm-python isn't installed (we might be on a debian system):
|
# if rpm-python isn't installed (we might be on a debian system):
|
||||||
|
@ -19,6 +19,7 @@ class Checker:
|
|||||||
import rpm
|
import rpm
|
||||||
self.dbdir = mkdtemp(prefix='oscrpmdb')
|
self.dbdir = mkdtemp(prefix='oscrpmdb')
|
||||||
self.imported = {}
|
self.imported = {}
|
||||||
|
# pylint: disable=E1101
|
||||||
rpm.addMacro('_dbpath', self.dbdir)
|
rpm.addMacro('_dbpath', self.dbdir)
|
||||||
self.ts = rpm.TransactionSet()
|
self.ts = rpm.TransactionSet()
|
||||||
self.ts.initDB()
|
self.ts.initDB()
|
||||||
@ -29,6 +30,7 @@ class Checker:
|
|||||||
def readkeys(self, keys=None):
|
def readkeys(self, keys=None):
|
||||||
import rpm
|
import rpm
|
||||||
keys = keys or []
|
keys = keys or []
|
||||||
|
# pylint: disable=E1101
|
||||||
rpm.addMacro('_dbpath', self.dbdir)
|
rpm.addMacro('_dbpath', self.dbdir)
|
||||||
for key in keys:
|
for key in keys:
|
||||||
try:
|
try:
|
||||||
@ -40,6 +42,7 @@ class Checker:
|
|||||||
raise KeyError('', "no key imported")
|
raise KeyError('', "no key imported")
|
||||||
|
|
||||||
import rpm
|
import rpm
|
||||||
|
# pylint: disable=E1101
|
||||||
rpm.delMacro("_dbpath")
|
rpm.delMacro("_dbpath")
|
||||||
|
|
||||||
# python is an idiot
|
# python is an idiot
|
||||||
|
Loading…
Reference in New Issue
Block a user