def required_modules_error(name, docstring):
 modules = required_module_list(docstring)
 if (not modules):
  return ''
 filename = os.path.basename(name).split('.')[0]
 msg = "'{0}' requires these python modules: {1}"
 return msg.format(filename, ', '.join(modules))

def required_modules_error ( name , docstring ) : modules = required_module_list ( docstring ) if ( not modules ) : return '' filename = os . path . basename ( name ) . split ( '.' ) [ 0 ] msg = "'{0}' requires these python modules: {1}" return msg . format ( filename , ', ' . join ( modules ) )
pretty print error messages in critical salt modules which are missing deps not always in stdlib such as win32api on windows .