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

dion at linutronix.de dion at linutronix.de
Mon Jun 24 17:38:58 CEST 2019


From: Olivier Dion <dion at linutronix.de>

Signed-off-by: Olivier Dion <dion 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..beabe70d 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]))
     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]))
     else:
         print("No Updates available")
-- 
2.11.0




More information about the elbe-devel mailing list