really really really think this should build on jenkins

This commit is contained in:
fawce
2012-07-30 18:43:10 -04:00
parent f1f2fadf81
commit 3e577c56c5
+3 -3
View File
@@ -550,11 +550,11 @@ def shorten_filename(filename):
# this will work on
# /zipline/workspace/zipline/core/component.py, but fail for
# /home/fawce/projects/zipline/zipline/core/component.py
path_re = r'(?<=./zipline/).*'
path_re = r'(.*)(/zipline/.*[.]py)'
match = re.search(path_re, filename)
if match:
filepath = match.group(0)
if match and match.lastindex == 2:
filepath = match.group(2)
return os.path.join('/zipline',filepath)
else:
# return just the filename.