aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/arch.py
blob: 6cc3dbb351dce30fc8eb0a43bf3beab290dbafc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from popen2 import Popen4
import os

def invoke(args):
    q=Popen4(args)
    output = q.fromchild.read()
    status = q.wait()
    if os.WIFEXITED(status):
        return (os.WEXITSTATUS(status))

def add_id(filename):
    return invoke(("tla", "add-id", filename))

def delete_id(filename):
    return invoke(("tla", "delete-id", filename))