aboutsummaryrefslogtreecommitdiffstats
path: root/run/proc_entry.py
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2012-11-26 17:06:27 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2012-11-26 17:06:27 -0500
commitb43b83beead92ff7cf28a5fe5a2710537268aae1 (patch)
treed9c29b14cd18a9df520f36d7e85eb460c30fa7a9 /run/proc_entry.py
parentcb8db5d30ee769304c2c2b00f2a7d9bcb3c4098f (diff)
Read locations of binary files from path instead of config.py.
Diffstat (limited to 'run/proc_entry.py')
-rw-r--r--run/proc_entry.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/run/proc_entry.py b/run/proc_entry.py
new file mode 100644
index 0000000..0b7f9ce
--- /dev/null
+++ b/run/proc_entry.py
@@ -0,0 +1,12 @@
1import os
2
3class ProcEntry(object):
4 def __init__(self, proc, data):
5 self.proc = proc
6 self.data = data
7
8 def write_proc(self):
9 if not os.path.exists(self.proc):
10 raise Exception("Invalid proc entry %s" % self.proc)
11 with open(self.proc, 'w') as entry:
12 entry.write(self.data)