[elbe-devel] [PATCH v2 1/7] xmlpreprocess: apply autopep8

Manuel Traut manut at linutronix.de
Fri Oct 19 13:36:04 CEST 2018


On Mon, Oct 15, 2018 at 12:43:14PM +0200, Torben Hohn wrote:
> run "autopep8 --in-place elbepack/xmlpreprocess.py" and commit result
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Reviewed-by: Manuel Traut <manut at linutronix.de>

> ---
>  elbepack/xmlpreprocess.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/elbepack/xmlpreprocess.py b/elbepack/xmlpreprocess.py
> index 6ec70c37..51bc6bdc 100644
> --- a/elbepack/xmlpreprocess.py
> +++ b/elbepack/xmlpreprocess.py
> @@ -46,7 +46,7 @@ def xmlpreprocess(fname, output, variants=None):
>          rmlist = []
>          for tag in xml.iter('*'):
>              if 'variant' in tag.attrib:
> -                tag_variants = set (tag.attrib['variant'].split(','))
> +                tag_variants = set(tag.attrib['variant'].split(','))
>  
>                  # check if tag_variants intersects with
>                  # active variants.
> @@ -70,7 +70,7 @@ def xmlpreprocess(fname, output, variants=None):
>          #
>          # Use xpath expressions to identify mergeable sections.
>          for mergepath in mergepaths:
> -            mergenodes = xml.xpath (mergepath)
> +            mergenodes = xml.xpath(mergepath)
>  
>              # if there is just one section of a type
>              # or no section, nothing needs to be done
> @@ -81,7 +81,7 @@ def xmlpreprocess(fname, output, variants=None):
>              # section[1..n]
>              for section in mergenodes[1:]:
>                  for c in section.getchildren():
> -                    mergenodes[0].append (c)
> +                    mergenodes[0].append(c)
>                  section.getparent().remove(section)
>  
>          # handle archivedir elements
> @@ -101,7 +101,7 @@ def xmlpreprocess(fname, output, variants=None):
>          raise XMLPreprocessError("XML Parse error\n" + str(sys.exc_info()[1]))
>      except ArchivedirError:
>          raise XMLPreprocessError("<archivedir> handling failed\n" +
> -                                     str(sys.exc_info()[1]))
> +                                 str(sys.exc_info()[1]))
>      except BaseException:
>          raise XMLPreprocessError(
>              "Unknown Exception during validation\n" + str(sys.exc_info()[1]))
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel



More information about the elbe-devel mailing list