Strip leading path separator characters in a portable way.

Addresses the situation where get_id() ignores root_dir and always
looks for minion_id in /etc/salt/minion_id.

Fixes 10035
This commit is contained in:
Thayne Harbaugh 2014-01-29 14:16:28 -07:00 committed by Daniel Bradshaw
parent 8a53c925ea
commit 370522e2d5

View File

@ -1643,7 +1643,7 @@ def get_id(root_dir=None, minion_id=False, cache=True):
# Check for cached minion ID
id_cache = os.path.join(root_dir,
config_dir.lstrip('\\'),
config_dir.lstrip(os.path.sep),
'minion_id')
if cache: