def _unlockEnt(self, password_attr, ent, empty_passwrod=False):
    password = ent[password_attr][0]
    if ('{CRYPT}' not in password):
        raise RuntimeError
    if empty_passwrod:
        if (password == '{CRYPT}!'):
            raise RuntimeError
        password = password.replace('{CRYPT}!', '{CRYPT}')
    else:
        password = password.replace('{CRYPT}!', '{CRYPT}')
    ent[password_attr] = password
    ent.save()
def _unlockEnt(self, password_attr, ent, empty_passwrod=False):
    password = ent[password_attr][0]
    if ('{CRYPT}' not in password):
        raise RuntimeError
    if empty_passwrod:
        if (password == '{CRYPT}!'):
            raise RuntimeError
        password = password.replace('{CRYPT}!', '{CRYPT}')
    else:
        password = password.replace('{CRYPT}!', '{CRYPT}')
    ent[password_attr] = password
    ent.save()