def required_module_list(docstring=None):
 if (not docstring):
  return []
 ret = []
 modules = parse_docstring(docstring).get('deps', [])
 for mod in modules:
  try:
   imp.find_module(mod)
  except ImportError:
   ret.append(mod)
 return ret

def required_module_list ( docstring = None ) : if ( not docstring ) : return [ ] ret = [ ] modules = parse_docstring ( docstring ) . get ( 'deps' , [ ] ) for mod in modules : try : imp . find_module ( mod ) except ImportError : ret . append ( mod ) return ret
return a list of python modules required by a salt module that arent in stdlib and dont exist on the current pythonpath .