[elbe-devel] [PATCH 2/4] repomanager: fix using undefined variable

Torben Hohn torben.hohn at linutronix.de
Thu Sep 20 09:12:05 CEST 2018


On Fri, Sep 14, 2018 at 01:53:03PM +0200, Manuel Traut wrote:
> att is only well defined in the for loop, probably we need to export
> more than one suite here, so add the loop again.
> 
> It can't be done inside the loop, because the config file is not written
> yet.
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/repomanager.py | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
> index 54dae205..e43b2911 100644
> --- a/elbepack/repomanager.py
> +++ b/elbepack/repomanager.py
> @@ -170,11 +170,12 @@ class RepoBase(object):
>                  self.fs.path +
>                  '" update')
>          else:
> -            self.log.do(
> -                'reprepro --basedir "' +
> -                self.fs.path +
> -                '" export ' +
> -                att.codename)
> +            for att in self.attrs:
> +                self.log.do(
> +                    'reprepro --basedir "' +
> +                    self.fs.path +
> +                    '" export ' +
> +                    att.codename)
>  
>      def finalize(self):
>          os.environ['GNUPGHOME'] = "/var/cache/elbe/gnupg"
> -- 
> 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/67ce9770/attachment.sig>


More information about the elbe-devel mailing list