Skip to content

Commit

Permalink
Cache the VBOX check so we don't have to spawn another camcontrol for…
Browse files Browse the repository at this point in the history
… each disk
  • Loading branch information
kev009 committed Aug 11, 2015
1 parent 2a24f8b commit ded9f78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions salt/grains/disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# Import salt libs
import salt.utils
import salt.utils.decorators as decorators

# Solve the Chicken and egg problem where grains need to run before any
# of the modules are loaded and are generally available for any usage.
Expand Down Expand Up @@ -55,6 +56,7 @@ class _camconsts(object):
_camconsts.__dict__ if not key.startswith('__')]


@decorators.memoize
def _freebsd_vbox():
# Don't tickle VirtualBox storage emulation bugs
camcontrol = salt.utils.which('camcontrol')
Expand Down

0 comments on commit ded9f78

Please sign in to comment.