def get_password(self, service, username):
assoc = self._generate_assoc(service, username)<EOL>service = escape_for_ini(service)<EOL>username = escape_for_ini(username)<EOL>config = configparser.RawConfigParser()<EOL>if os.path.exists(self.file_path):<EOL><INDENT>config.read(self.file_path)<EOL><DEDENT>try:<EOL><INDENT>password_base64 = config.get(service, username).encode()<EOL>password_encrypted = decodebytes(password_base64)<EOL>try:<EOL><INDENT>password = self.decrypt(password_encrypted, assoc).decode('<STR_LIT:utf-8>')<EOL><DEDENT>except ValueError:<EOL><INDENT>password = self.decrypt(password_encrypted).decode('<STR_LIT:utf-8>')<EOL><DEDENT><DEDENT>except (configparser.NoOptionError, configparser.NoSectionError):<EOL><INDENT>password = None<EOL><DEDENT>return password<EOL>
Read the password from the file.