From 3f42f80970c0210eab507d522266e0c3686fa06b Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Wed, 7 Apr 2021 12:42:17 -0700 Subject: [PATCH] NFC: Refactor a string so we can add a comment to it. Test: Run cargo2android.py Change-Id: Id833bd3292a4cd9f8c348aee9725e0924d826d97 --- scripts/cargo2android.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py index 786cf8509..c5585f3a8 100755 --- a/scripts/cargo2android.py +++ b/scripts/cargo2android.py @@ -95,6 +95,9 @@ ANDROID_BP_HEADER = ( CARGO_OUT = 'cargo.out' # Name of file to keep cargo build -v output. +# This should be kept in sync with tools/external_updater/crates_updater.py. +ERRORS_LINE = 'Errors in ' + CARGO_OUT + ':' + TARGET_TMP = 'target.tmp' # Name of temporary output directory. # Message to be displayed when this script is called without the --run flag. @@ -1355,7 +1358,7 @@ class Runner(object): if self.args.dependencies and self.dependencies: self.dump_dependencies() if self.errors: - self.append_to_bp('\nErrors in ' + CARGO_OUT + ':\n' + self.errors) + self.append_to_bp('\n' + ERRORS_LINE + '\n' + self.errors) return self def add_ar_object(self, obj):