[elbe-devel] [PATCH v3 01/15] Change os.sytem to shellhelper::system for "check_updates.py"

Torben Hohn torben.hohn at linutronix.de
Wed Jun 26 16:31:02 CEST 2019


On Wed, Jun 26, 2019 at 10:40:05AM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

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

> ---
>  elbepack/commands/check_updates.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/elbepack/commands/check_updates.py b/elbepack/commands/check_updates.py
> index 2e5da5a1..08c006bb 100644
> --- a/elbepack/commands/check_updates.py
> +++ b/elbepack/commands/check_updates.py
> @@ -7,7 +7,6 @@
>  
>  from __future__ import print_function
>  
> -import os
>  import sys
>  
>  from optparse import OptionParser
> @@ -16,6 +15,7 @@ from elbepack.treeutils import etree
>  from elbepack import virtapt
>  from elbepack.validate import validate_xml
>  from elbepack.xmldefaults import ElbeDefaults
> +from elbepack.shellhelper import system
>  
>  
>  def run_command(argv):
> @@ -114,10 +114,10 @@ def run_command(argv):
>      if errors > 0:
>          print("%d Errors occured, xml files needs fixing" % errors)
>          if opt.script:
> -            os.system("%s ERRORS %s" % (opt.script, args[0]))
> +            system("%s ERRORS %s" % (opt.script, args[0]), allow_fail=True)
>      elif required_updates > 0:
>          print("%d updates required" % required_updates)
>          if opt.script:
> -            os.system("%s UPDATE %s" % (opt.script, args[0]))
> +            system("%s UPDATE %s" % (opt.script, args[0]), allow_fail=True)
>      else:
>          print("No Updates available")
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
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



More information about the elbe-devel mailing list