mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix backtrace, when listing plugins
munin usually symlinks its plugins in /etc/munin/plugins. this catches the case that the symlink is broken.
This commit is contained in:
parent
251c8f9f5f
commit
8511a6c0a6
1 changed files with 4 additions and 1 deletions
|
@ -101,7 +101,10 @@ def list_plugins():
|
|||
for plugin in pluginlist:
|
||||
# Check if execute bit
|
||||
statf = os.path.join(PLUGINDIR, plugin)
|
||||
executebit = stat.S_IXUSR & os.stat(statf)[stat.ST_MODE]
|
||||
try:
|
||||
executebit = stat.S_IXUSR & os.stat(statf)[stat.ST_MODE]
|
||||
except OSError:
|
||||
pass
|
||||
if executebit:
|
||||
ret.append(plugin)
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue