Browse Source

Fixed it some more

Thomas Johnson 1 year ago
parent
commit
b6be2ce826
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      model.py

+ 3
- 2
model.py View File

@@ -295,12 +295,13 @@ class Action(DBObject):
295 295
         args['escaped_values'] = {k: v.replace('\\', '\\\\').replace('\'', '\\\'') for k, v in
296 296
                 values.items()}
297 297
         cmd = render_template_string(self.a1, **args)
298
+        print "dbg: ", cmd
298 299
         if not self.a2:
299
-			proc = subprocess.Popen(cmd, shell=True)
300
+			proc = subprocess.Popen(['bash', '-c', cmd])
300 301
 			return 'forked'
301 302
         else:
302 303
 			try:
303
-				return subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
304
+				return subprocess.check_output(['bash', '-c', cmd], stderr=subprocess.STDOUT)
304 305
 			except subprocess.CalledProcessError as e:
305 306
 				return e.output
306 307
 

Loading…
Cancel
Save