mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #11015 from mgwilliams/seed
salt.modules.seed: Don't die due to bad symlinks
This commit is contained in:
commit
8c93e21dec
@ -235,9 +235,12 @@ def _chroot_exec(root, cmd):
|
||||
def _chroot_pids(chroot):
|
||||
pids = []
|
||||
for root in glob.glob('/proc/[0-9]*/root'):
|
||||
link = os.path.realpath(root)
|
||||
if link.startswith(chroot):
|
||||
pids.append(int(os.path.basename(
|
||||
os.path.dirname(root)
|
||||
)))
|
||||
try:
|
||||
link = os.path.realpath(root)
|
||||
if link.startswith(chroot):
|
||||
pids.append(int(os.path.basename(
|
||||
os.path.dirname(root)
|
||||
)))
|
||||
except OSError:
|
||||
pass
|
||||
return pids
|
||||
|
Loading…
Reference in New Issue
Block a user