From 6c8ea5536f4b803bf89c8d89492e9bff5f4b9b5a Mon Sep 17 00:00:00 2001
From: christian <christian.steinhaus@rwth-aachen.de>
Date: Thu, 15 Oct 2015 16:35:40 +0200
Subject: [PATCH] all subshells now print the their output

---
 scripts/linuxparty.py | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/scripts/linuxparty.py b/scripts/linuxparty.py
index 5bd0090..423b944 100755
--- a/scripts/linuxparty.py
+++ b/scripts/linuxparty.py
@@ -88,11 +88,10 @@ def installProcess():
     window.ui.progressBar.show()
     window.ui.progressBar.setRange(0,0)
     pkglist = getPackagelistTree()
-    print(pkglist)
-    #installPackages()
-    window.ui.progressBar.setRange(0,1)
-    window.ui.progressBar.setValue(1)
-    makeDocu(pkglist)
+    installPackages(pkglist)
+    #window.ui.progressBar.setRange(0,1)
+    #window.ui.progressBar.setValue(1)
+    makeDoku(pkglist)
     showSuccBox()
 
 def showSuccBox():
@@ -128,25 +127,23 @@ def checkIfRoot():
     else:
         pass
 
-def installPackages():
-    command=["echo", "apt-get", "install","--quiet", "-y", "--force-yes"]
+def installPackages(strlist):
+    command=["echo", "apt-get", "install","--quiet", "-y", "--force-yes"," ".join(strlist)]
     #command=["apt-get", "install","--quiet", "-y", "--force-yes"]
-    subprocess.check_call(command+pkglist, shell=False)
+    #subprocess.call(command, shell=False)
+    stdout_installPackages = subprocess.check_output(command, shell=False)
+    print(stdout_installPackages)
 
 def mountStick():
     command=[basepath+"infuse_offline_repo.sh"]
-    try:
-        subprocess.run(command, shell=False)
-    except:
-        showErrorBox("subprocess infuse_offlinerepo.sh failed.")
+    stdout_mountStick = subprocess.check_output(command, shell=False)
+    print(stdout_mountStick)
 
-def makeDocu():
-    command=["echo", "./makeDoku.sh", os.path.dirname(basepath), " ".join(pkglist)]
+def makeDoku(stringlist):
+    command=["echo", "./makeDoku.sh", os.path.dirname(basepath), " ".join(stringlist)]
     #command=["./makeDoku.sh", os.path.dirname(basepath), " ".join(pkglist)]
-    try:
-        subprocess.run(command, shell=False)
-    except:
-        showErrorBox("Subprocess makeDocu.sh failed")
+    stdout_makeDoku = subprocess.check_output(command, shell=False)
+    print(stdout_makeDoku)
 
 def getPackagelist():
     installList = []
@@ -217,7 +214,7 @@ if __name__ == '__main__':
     #mountStick()
     window = Main()
     window.setWindowTitle("Linux Install Party Software Installer")
-    with open('./offline_repo.json', 'r') as inputfile:
+    with open('../offline_repo.json', 'r') as inputfile:
     #with open('./test.json', 'r') as inputfile:
         data=json.loads(inputfile.read(), object_pairs_hook=OrderedDict)
     fillTreeView(data, window.ui.treeView)
-- 
GitLab