Remove sensitive keys and passwords from YAML files.
198380
def postproc(self):
        """"""
        secrets_files = [
            "/etc/openstack_deploy/user_secrets.yml",
            "/etc/rpc_deploy/user_secrets.yml"
        ]
        regexp = r"(?m)^\s*#*([\w_]*:\s*).*"
        for secrets_file in secrets_files:
            self.do_path_regex_sub(
                secrets_file,
                regexp,
                r"\1*********")
104378
def _trim_config(self, b_config, mod, key):
        '''
        
        '''
        if isinstance(b_config[mod], list):
            self._remove_list_item(b_config[mod], key)
        elif isinstance(b_config[mod], dict):
            b_config[mod].pop(key)
        return b_config
478182
def cleanup_mprocess(config_path, cfg):
    
    for key in ('keyFile', 'logPath', 'dbpath'):
        remove_path(cfg.get(key, None))
    isinstance(config_path, str) and os.path.exists(config_path) and remove_path(config_path)
993288
def clean(docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox', '**/__pycache__']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        lrun('rm -rf {0}'.format(pattern))
1290111
def clean(ctx, docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        with ctx.cd(ROOT):
            ctx.run('rm -rf {0}'.format(pattern))
1055641
def clean(self, user=None):
        """"""
        doc = self._resource
        internal_fields = deepcopy(self.internal_fields)
        if user is None or not user.is_user(self.organisation_id):
            internal_fields.append('permissions')

        result = {k: v for k, v in doc.iteritems() if k not in internal_fields}

        return result
1366017
def clean(self):
        ''''''
        data = super(PasswordMixin, self).clean()
        if 'password' in data and 'confirm_password' in data:
            if data['password'] != data['confirm_password']:
                raise ValidationError(_('Passwords do not match.'))
        return data
827871
def strip_key_strings(pofile):
    
    newlist = [entry for entry in pofile if not is_key_string(entry.msgid)]
    del pofile[:]
    pofile += newlist
1194328
private void cleanProperties(Map<String, String> props) {
        if (props != null) {
            props.remove(StorageProvider.PROPERTIES_CONTENT_MD5);
            props.remove(StorageProvider.PROPERTIES_CONTENT_CHECKSUM);
            props.remove(StorageProvider.PROPERTIES_CONTENT_MODIFIED);
            props.remove(StorageProvider.PROPERTIES_CONTENT_SIZE);
            props.remove(HttpHeaders.CONTENT_LENGTH);
            props.remove(HttpHeaders.CONTENT_TYPE);
            props.remove(HttpHeaders.LAST_MODIFIED);
            props.remove(HttpHeaders.DATE);
            props.remove(HttpHeaders.ETAG);
            props.remove(HttpHeaders.CONTENT_LENGTH.toLowerCase());
            props.remove(HttpHeaders.CONTENT_TYPE.toLowerCase());
            props.remove(HttpHeaders.LAST_MODIFIED.toLowerCase());
            props.remove(HttpHeaders.DATE.toLowerCase());
            props.remove(HttpHeaders.ETAG.toLowerCase());
        }
    }
1362434
def remove(self, key, glob=False):
        """"""
        ns = self.namespace(key, glob)
        try:
            self.keyring.delete_password(ns, key)
        except PasswordDeleteError:  # OSX and gnome have no delete method 
            self.set(key, '', glob)
1091881
def clean(self):
    

    cleaned_data = super().clean()
    psw = cleaned_data.get("password")
    pswr = cleaned_data.get("password_repetir")

    if psw != pswr:
      self.add_error('password', ValidationError(_('Las claves ingresadas no son iguales'), code='invalid'))
357150
def _scrub_key(key):
    
    if key == None:
        return None

    output = []
    for c in key:
        if c in [":", "."]:
            output.append(c)
    return "".join(output)
1155715
def _clear(self):
        
        self.root = RootGroup()
        self.groups = []
        self.entries = []
        self.readonly = False
        self.header = None
        self.password = None
        self.keyfile = None
        self.filepath = None
640378
def cleanup_headers(self):
        """"""
        headers = {'Content-Type': 'application/json'}
        headers['Authorization'] = self.__token
        self.__headers = headers
        self.__params = {}
1303605
def _cleanup(self, domains):
        """"""
        for option in domains.values():
            try:
                os.remove(option['pot'])
            except (IOError, OSError):
                # It is not a problem if we can't actually remove the temporary file
                pass
1201631
def clean():
    """"""
    os.chdir(os.path.join(project_root, 'docs'))
    sh("make clean")
    os.chdir(project_root)
    sh("rm -rf pyoauth2.egg-info")
446799
def clean(self):
        
        #TODO: add cleaning of mask files, *if* created ...
        for f in self.catalog_names:
            if 'match' in f:
                if os.path.exists(self.catalog_names[f]):
                    log.info('Deleting intermediate match file: %s'%
                                self.catalog_names[f])
                    os.remove(self.catalog_names[f])
            else:
                for extn in f:
                    if os.path.exists(extn):
                        log.info('Deleting intermediate catalog: %d'%extn)
                        os.remove(extn)