[elbe-devel] [PATCH 15/40] pylint: fix access of private variable

Torben Hohn torben.hohn at linutronix.de
Thu Sep 20 11:47:47 CEST 2018


On Fri, Sep 14, 2018 at 01:56:27PM +0200, Manuel Traut wrote:
> by making the varialbe public.
> 
> the acces was added by '86b4fe4d2e6d6928b5e3101acb4760e612b7080d'
> 
>  build_sysroot: build sysroot in seperate buildenv
> 
> This also makes the rpcaptcache variable in elbeproject useless. So also
> remove this.

not happy with this.
env should have a get_rpcaptcache() method.


> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>
> ---
>  elbepack/elbeproject.py | 9 ++++-----
>  elbepack/rfs.py         | 2 +-
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index a2dffa53..0f29695a 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -711,20 +711,20 @@ class ElbeProject (object):
>      def get_rpcaptcache(self, env=None):
>          if not env:
>              env = self.buildenv
> -        if env._rpcaptcache is None:
> -            env._rpcaptcache = get_rpcaptcache(
> +        if env.rpcaptcache is None:
> +            env.rpcaptcache = get_rpcaptcache(
>                  env.rfs,
>                  self.log.fp.name,
>                  self.arch,
>                  self.rpcaptcache_notifier,
>                  self.xml.prj.has('norecommend'),
>                  self.xml.prj.has('noauth'))
> -        return env._rpcaptcache
> +        return env.rpcaptcache
>  
>      def drop_rpcaptcache(self, env=None):
>          if not env:
>              env = self.buildenv
> -        env._rpcaptcache = None
> +        env.rpcaptcache = None
>  
>      def has_full_buildenv(self):
>          if os.path.exists(self.chrootpath):
> @@ -756,7 +756,6 @@ class ElbeProject (object):
>              raise IncompatibleArchitectureException(oldarch, newarch)
>  
>          # Throw away old APT cache, targetfs and buildenv
> -        self._rpcaptcache = None
>          self.targetfs = None
>          self.buildenv = None
>  
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index ed6d3d57..ca1ed470 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -30,7 +30,7 @@ class BuildEnv (object):
>          self.xml = xml
>          self.log = log
>          self.path = path
> -        self._rpcaptcache = None
> +        self.rpcaptcache = None
>  
>          self.rfs = BuildImgFs(path, xml.defs["userinterpr"])
>  
> -- 
> 2.19.0.rc2
> 

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180920/383376e8/attachment.sig>


More information about the elbe-devel mailing list