Skip to content

Instantly share code, notes, and snippets.

@nemik
Created November 26, 2012 19:32

Revisions

  1. nemik created this gist Nov 26, 2012.
    8 changes: 8 additions & 0 deletions gistfile1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    try:
    result = subprocess.Popen(["/bin/bash","/home/linaro/photobooth/photobooth_process.sh"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    out, err = result.communicate()
    if result.returncode == 0:
    return "ok"
    return "%s %s %s" % (result.returncode, err, out), 500
    except OSError as e:
    return " ",e