diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-18 13:15:42 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-18 13:15:42 -0400 |
commit | 16dfc8df20c6befeed423217a2e0f5ae59b5a04d (patch) | |
tree | 722ff18b111f6ab2fc11fffa46e78889bd2d5708 /parse | |
parent | 652a57b5a53e41e585c7e0d10601c807ba08c36f (diff) |
Use smarter defaults which can handle data from Bjorns scripts.
Diffstat (limited to 'parse')
-rw-r--r-- | parse/dir_map.py | 3 | ||||
-rw-r--r-- | parse/ft.py | 2 | ||||
-rw-r--r-- | parse/point.py | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/parse/dir_map.py b/parse/dir_map.py index 601dd3b..a8d2a83 100644 --- a/parse/dir_map.py +++ b/parse/dir_map.py | |||
@@ -56,6 +56,9 @@ class DirMap(object): | |||
56 | 56 | ||
57 | remove_childless2(self.root) | 57 | remove_childless2(self.root) |
58 | 58 | ||
59 | def is_empty(self): | ||
60 | return not len(self.root.children) | ||
61 | |||
59 | def write(self, out_dir): | 62 | def write(self, out_dir): |
60 | def write2(path, node): | 63 | def write2(path, node): |
61 | out_path = "/".join(path) | 64 | out_path = "/".join(path) |
diff --git a/parse/ft.py b/parse/ft.py index 19453d1..98405f4 100644 --- a/parse/ft.py +++ b/parse/ft.py | |||
@@ -63,7 +63,7 @@ def extract_ft_data(result, data_dir, work_dir, cycles): | |||
63 | data_dir = os.path.abspath(data_dir) | 63 | data_dir = os.path.abspath(data_dir) |
64 | work_dir = os.path.abspath(work_dir) | 64 | work_dir = os.path.abspath(work_dir) |
65 | 65 | ||
66 | freg = conf.FILES['ft_data'] + "$" | 66 | freg = conf.FILES['ft_matches'] + "$" |
67 | bins = [f for f in os.listdir(data_dir) if re.match(freg, f)] | 67 | bins = [f for f in os.listdir(data_dir) if re.match(freg, f)] |
68 | 68 | ||
69 | if not len(bins): | 69 | if not len(bins): |
diff --git a/parse/point.py b/parse/point.py index d577306..f2b266a 100644 --- a/parse/point.py +++ b/parse/point.py | |||
@@ -128,8 +128,7 @@ class ExpPoint(object): | |||
128 | self.stats[type] = value | 128 | self.stats[type] = value |
129 | 129 | ||
130 | def __str__(self): | 130 | def __str__(self): |
131 | # return "<ExpPoint-%s>\n%s" % (self.id, dict_str(self.stats)) | 131 | return "<ExpPoint-%s>\n%s" % (self.id, dict_str(self.stats)) |
132 | return "<ExpPoint-%s>" % (self.id) | ||
133 | 132 | ||
134 | def get_stats(self): | 133 | def get_stats(self): |
135 | return self.stats.keys() | 134 | return self.stats.keys() |