def decode_password(obfuscated_password, username=None): if settings.OBFUSCATE_PASSWORD_FOR_NIC_COMPLIANCE: return get_raw_password(obfuscated_password, username) else: return obfuscated_password