Gruntwork in middleware where it belongs

This commit is contained in:
James Barnsley
2018-11-02 21:33:24 +13:00
parent acad6490f5
commit f7faa059ad
6 changed files with 10404 additions and 13656 deletions

View File

@ -29,10 +29,13 @@ class IrisSystemThread(Thread):
# Run the actual task (this is the process-blocking instruction)
path = os.path.dirname(__file__)
response = subprocess.check_output(["sudo "+path+"/system.sh "+self.action], shell=True)
output = subprocess.check_output(["sudo "+path+"/system.sh "+self.action], shell=True)
# And then, when complete, return to our callback
if self.callback:
response = {
'output': output
}
self.callback(response, False)