Skip to content

Commit

Permalink
fix backtrace, when listing plugins
Browse files Browse the repository at this point in the history
munin usually symlinks its plugins in /etc/munin/plugins.
this catches the case that the symlink is broken.
  • Loading branch information
pille committed Jun 10, 2015
1 parent 251c8f9 commit 8511a6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion salt/modules/munin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8511a6c

Please sign in to comment.