Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3cmd: handle errors properly #203

Merged
merged 1 commit into from
Oct 23, 2017
Merged

s3cmd: handle errors properly #203

merged 1 commit into from
Oct 23, 2017

Conversation

balamurugana
Copy link
Member

Fix #193 #201

rv=$?
if [ "$rv" -ne 0 ] && [ "$expected_rv" -eq 0 ]; then
if [ -n "$MINT_MODE" ]; then
err=$(python -c 'import sys,json; print(json.dumps(sys.stdin.read()))' <<<"$err")
printf '{"name": "s3cmd", "duration": "%d", "function": "%s", "status": "FAIL", "error": "%s"}\n' "$(get_duration "$start_time")" "$func_name" "$err"
err=$(printf "$err" | python -c 'import sys,json; print(json.dumps(sys.stdin.read()))')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shellcheck issue:

In run/core/s3cmd/test.sh line 128:
err=$(printf "$err" | python -c 'import sys,json; print(json.dumps(sys.stdin.read()))')
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".

@nitisht nitisht dismissed their stale review October 22, 2017 04:00

Two reviewers already added.

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nitisht nitisht merged commit 0bc55b1 into minio:master Oct 23, 2017
@balamurugana balamurugana deleted the fix-s3cmd branch October 23, 2017 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants