From 57291dcc9525598a81c2b7aa01e41f3fe238ae19 Mon Sep 17 00:00:00 2001 From: rmistry Date: Wed, 1 Apr 2015 09:12:51 -0700 Subject: Find the HASHTAGS file even if you are not at the checkout root. The post upload hook was failing if you were not at the root, this fixes it. NOTRY=true Review URL: https://codereview.chromium.org/1058483002 --- PRESUBMIT.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'PRESUBMIT.py') diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 8b60774de5..a036be6fc8 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -392,7 +392,8 @@ def PostUploadHook(cl, change, output_api): 'Automatically added \'NOTRY=true\' to the CL\'s description')) # Read and process the HASHTAGS file. - with open('HASHTAGS', 'rb') as hashtags_csv: + hashtags_fullpath = os.path.join(change._local_root, 'HASHTAGS') + with open(hashtags_fullpath, 'rb') as hashtags_csv: hashtags_reader = csv.reader(hashtags_csv, delimiter=',') for row in hashtags_reader: if not row or row[0].startswith('#'): -- cgit v1.2.3