1 Index: keyring-5.3/keyring/backends/file.py
2 ===================================================================
3 --- keyring-5.3.orig/keyring/backends/file.py
4 +++ keyring-5.3/keyring/backends/file.py
5 @@ -92,10 +92,6 @@ class BaseKeyring(FileBacked, KeyringBac
6 # ensure the file exists
7 self._ensure_file_path()
9 - # load the keyring from the disk
10 - config = configparser.RawConfigParser()
11 - config.read(self.file_path)
13 # obtain lock for the keyring file
16 @@ -107,15 +103,21 @@ class BaseKeyring(FileBacked, KeyringBac
20 - # update the keyring with the password
21 - if not config.has_section(service):
22 - config.add_section(service)
23 - config.set(service, username, password_base64)
26 - # save the keyring back to the file
27 + # Load the keyring from the disk
28 + config = configparser.RawConfigParser()
29 + config.read(self.file_path)
31 + # Update the keyring with the password
32 + if not config.has_section(service):
33 + config.add_section(service)
34 + config.set(service, username, password_base64)
36 + # Save the keyring back to the file
37 with open(self.file_path, 'w') as config_file:
38 config.write(config_file)
41 os.remove('/tmp/.keyringlock')