With "sudo", the $PATH is overriden an really basic:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
It doesn't list the /usr/local/(s)bin, hence the created
symlink wasn't seen by the script.
It also push that symlink creation in the __new__ special
method in order to make it cleaner.
Finaly, it takes care of lint/pep8 failures, not related to
this change (how is that even possible?!)
Reviewed: https:/ /review. openstack. org/639077 /git.openstack. org/cgit/ openstack/ python- tripleoclient/ commit/ ?id=88d3dfd5e74 ab738983d8d79b6 a1b0eb88a9e167
Committed: https:/
Submitter: Zuul
Branch: master
commit 88d3dfd5e74ab73 8983d8d79b6a1b0 eb88a9e167
Author: Cédric Jeanneret <email address hidden>
Date: Mon Feb 25 13:16:28 2019 +0100
Ensure created symlink is in $PATH
With "sudo", the $PATH is overriden an really basic: /sbin:/ bin:/usr/ sbin:/usr/ bin
PATH=
It doesn't list the /usr/local/(s)bin, hence the created
symlink wasn't seen by the script.
It also push that symlink creation in the __new__ special
method in order to make it cleaner.
Finaly, it takes care of lint/pep8 failures, not related to
this change (how is that even possible?!)
Co-Authored-By: Natal Ngétal <email address hidden>
Closes-Bug: 1817365
Partial-Bug: 1816446
Change-Id: If09eb32f43b2c2 6c8cd8a89f2e862 db1dd91dfed