diff options
Diffstat (limited to 'libbe/arch.py')
-rw-r--r-- | libbe/arch.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libbe/arch.py b/libbe/arch.py new file mode 100644 index 0000000..6cc3dbb --- /dev/null +++ b/libbe/arch.py @@ -0,0 +1,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)) |