saltstack/salt — pull request #5549 by jacksontj (2013-06-14 22:19:20+00:00)
Title: Adding "Depends" decorator to salt.utils

The Depends decorator allows you to optionally remove functions if sepecific globals/modules don't exist. This is particuarly helpful in larger scale deployments where some functions of the module work everywhere, but others require (for example) a service to be installed. This way you can avoid having to try/except all over the module to only load certain functions etc.