mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Silence pylint import errors of ipaserver in ipalib and ipaclient
In client-only installations the ipaserver package is not available. Additional guards prevent pylint to complain about missing ipaserver package. https://fedorahosted.org/freeipa/ticket/6468 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
25a6ddcce8
commit
987d24f784
@ -103,7 +103,7 @@ class ServerInfo(collections.MutableMapping):
|
||||
|
||||
def get_package(api):
|
||||
if api.env.in_tree:
|
||||
from ipaserver import plugins
|
||||
from ipaserver import plugins # pylint: disable=import-error
|
||||
else:
|
||||
try:
|
||||
plugins = api._remote_plugins
|
||||
|
@ -908,7 +908,7 @@ class API(plugable.API):
|
||||
@property
|
||||
def packages(self):
|
||||
if self.env.in_server:
|
||||
import ipaserver.plugins
|
||||
import ipaserver.plugins # pylint: disable=import-error
|
||||
result = (
|
||||
ipaserver.plugins,
|
||||
)
|
||||
@ -921,7 +921,7 @@ class API(plugable.API):
|
||||
)
|
||||
|
||||
if self.env.context in ('installer', 'updates'):
|
||||
import ipaserver.install.plugins
|
||||
import ipaserver.install.plugins # pylint: disable=import-error
|
||||
result += (ipaserver.install.plugins,)
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user