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

[fix] `_run_service_command` not properly returning False if command fails #616

Merged
merged 1 commit into from Jan 17, 2019

Conversation

Projects
None yet
1 participant
@alexAubin
Copy link
Member

alexAubin commented Jan 16, 2019

The problem

Not sure why we did not notice this before, but _run_service_command which is a low-level function behind yunohost service start|stop|... will show a Success even if the command failed ...

Solution

This is because subprocess.Popen won't raise a subprocess.CalledProcessError like the code expects ... check_call should be used instead.

PR Status

Tested and working

How to test

Make a dummy breaking change to nginx conf file and try to stop/start it.

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@alexAubin alexAubin added this to the 3.4.x milestone Jan 16, 2019

@alexAubin alexAubin merged commit bfe5056 into stretch-unstable Jan 17, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@alexAubin alexAubin deleted the fix-run-service-command branch Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment