(self)
| 54 | raise UnencryptedRepo() |
| 55 | |
| 56 | def load_keyblob(self): |
| 57 | if self.keyblob_storage == KeyBlobStorage.KEYFILE: |
| 58 | k = CHPOKeyfileKey(self.repository) |
| 59 | target = k.find_key() |
| 60 | with open(target) as fd: |
| 61 | self.keyblob = "".join(fd.readlines()[1:]) |
| 62 | |
| 63 | elif self.keyblob_storage == KeyBlobStorage.REPO: |
| 64 | key_data = self.repository.load_key().decode() |
| 65 | if not key_data: |
| 66 | # if we got an empty key, it means there is no key. |
| 67 | loc = self.repository._location.canonical_path() |
| 68 | raise RepoKeyNotFoundError(loc) from None |
| 69 | self.keyblob = key_data |
| 70 | |
| 71 | def store_keyblob(self, args): |
| 72 | if self.keyblob_storage == KeyBlobStorage.KEYFILE: |
no test coverage detected