aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorGravatar rmistry <rmistry@google.com>2015-04-01 09:12:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-01 09:12:51 -0700
commit57291dcc9525598a81c2b7aa01e41f3fe238ae19 (patch)
tree082a0b44b8b33cc490ae42ddfe4e320485b9275e /PRESUBMIT.py
parent97312d0f7946991d5c529a1edc53ed676eecb655 (diff)
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
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py3
1 files changed, 2 insertions, 1 deletions
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('#'):