set +e around read in propose_translation_update.

The bash read builtin returns a non zero value when it reads EOF.
Because the script uses a heredoc read will always read an EOF and
always return a non zero value. This non zero value and set -e causes
the script to exit. Temporarily set +e to get around this.

Change-Id: I2fc2f57ec492ce05089b15bd5b721d27ad4b2be3
Reviewed-on: https://review.openstack.org/13298
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2012-09-19 10:43:15 -07:00 committed by Jenkins
parent 86e371e631
commit 26cf8cc7ed

View File

@ -15,11 +15,16 @@ change_info=`ssh -p 29418 review.openstack.org gerrit query --current-patch-set
previous=`echo "$change_info" | grep "^ number:" | awk '{print $2}'`
if [ "x${previous}" != "x" ] ; then
change_id=`echo "$change_info" | grep "^change" | awk '{print $2}'`
# read return a non zero value when it reaches EOF. Because we use a
# heredoc here it will always reach EOF and return a nonzero value.
# Disable -e temporarily to get around the read.
set +e
read -d '' COMMIT_MSG <<EOF
Imported Translations from Transifex
Change-Id: $change_id
EOF
set -e
fi
# initialize transifex client