[elbe-devel] [PATCH 01/13] Change os.sytem to call_check for "check_updates.py"

dion at linutronix.de dion at linutronix.de
Mon Jun 24 12:48:41 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..6637a2a7 100644
--- a/elbepack/commands/check_updates.py
+++ b/elbepack/commands/check_updates.py
@@ -7,9 +7,9 @@
 
 from __future__ import print_function
 
-import os
 import sys
 
+from subprocess import check_call
 from optparse import OptionParser
 
 from elbepack.treeutils import etree
@@ -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]))
+            check_call("%s ERRORS %s" % (opt.script, args[0]), shell=True)
     elif required_updates > 0:
         print("%d updates required" % required_updates)
         if opt.script:
-            os.system("%s UPDATE %s" % (opt.script, args[0]))
+            check_call("%s UPDATE %s" % (opt.script, args[0]), shell=True)
     else:
         print("No Updates available")
-- 
2.11.0




More information about the elbe-devel mailing list