keying the shorted stack trace path on zipline, rather than zipline_repo

This commit is contained in:
fawce
2012-07-30 18:02:12 -04:00
parent ef1ca0388d
commit 7d4bfb023e
+3 -4
View File
@@ -546,13 +546,12 @@ def shorten_filename(filename):
return None
# check if the path contains zipeline_repo
path_re = r'(?<=zipline_repo).*'
path_re = r'(?<=zipline/).*'
match = re.search(path_re, filename)
if match:
return match.group(0)
parts = filename.split('zipline_repo')
return parts[1]
filepath = match.group(0)
return os.path.join('/zipline',filepath)
else:
# return just the filename.
head, tail = os.path.split(filename)