def _remove_persistent_module(mod, comment):
 conf = _get_modules_conf()
 mod_name = _strip_module_name(mod)
 if ((not mod_name) or (mod_name not in mod_list(True))):
  return set()
 escape_mod = re.escape(mod)
 if comment:
  __salt__['file.comment'](conf, '^[ DCTB  ]*{0}[ DCTB  ]?'.format(escape_mod))
 else:
  __salt__['file.sed'](conf, '^[ DCTB  ]*{0}[ DCTB  ]?'.format(escape_mod), '')
 return set([mod_name])

def _remove_persistent_module ( mod , comment ) : conf = _get_modules_conf ( ) mod_name = _strip_module_name ( mod ) if ( ( not mod_name ) or ( mod_name not in mod_list ( True ) ) ) : return set ( ) escape_mod = re . escape ( mod ) if comment : __salt__ [ 'file.comment' ] ( conf , '^[ DCTB  ]*{0}[ DCTB  ]?' . format ( escape_mod ) ) else : __salt__ [ 'file.sed' ] ( conf , '^[ DCTB  ]*{0}[ DCTB  ]?' . format ( escape_mod ) , '' ) return set ( [ mod_name ] )
remove module from configuration file .