From f1f2fadf813171556515d63e1cf47e555431b6f1 Mon Sep 17 00:00:00 2001 From: fawce Date: Mon, 30 Jul 2012 18:23:17 -0400 Subject: [PATCH] patched regex to work on jenkins --- zipline/protocol.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zipline/protocol.py b/zipline/protocol.py index c51845ef..e030fefb 100644 --- a/zipline/protocol.py +++ b/zipline/protocol.py @@ -545,8 +545,12 @@ def shorten_filename(filename): if filename == None: return None - # check if the path contains zipeline_repo - path_re = r'(?<=zipline/).*' + # check if the path contains zipeline + # looks for a zipline directory in the middle of the path + # 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/).*' match = re.search(path_re, filename) if match: