[blivet:master] Disable some pylint warnings that arise due to anaconda versions.
Vratislav Podzimek
vpodzime at redhat.com
Tue Jul 1 18:54:00 UTC 2014
On Tue, 2014-07-01 at 12:39 -0400, mulhern wrote:
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
> blivet/__init__.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/blivet/__init__.py b/blivet/__init__.py
> index ca61ae8..ff4f7fd 100644
> --- a/blivet/__init__.py
> +++ b/blivet/__init__.py
> @@ -122,11 +122,12 @@ def enable_installer_mode():
> from pyanaconda.errors import ERROR_RAISE # pylint: disable=redefined-outer-name
>
> if hasattr(iutil, 'getTargetPhysicalRoot'):
> - # Introduced in newer Anaconda
> - _storageRoot = iutil.getTargetPhysicalRoot()
> + # For anaconda versions > 21.43
> + _storageRoot = iutil.getTargetPhysicalRoot() # pylint: disable=no-name-in-module
> _sysroot = iutil.getSysroot()
> else:
> - from pyanaconda.constants import ROOT_PATH # pylint: disable=redefined-outer-name
> + # For prior anaconda versions
> + from pyanaconda.constants import ROOT_PATH # pylint: disable=redefined-outer-name,no-name-in-module
> _storageRoot = _sysroot = ROOT_PATH
>
> from pyanaconda.anaconda_log import program_log_lock
Looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list