(self, key)
| 110 | return all(f.exists() for f in (self.key_type_file, self.location_file, self.manifest_ts_file)) |
| 111 | |
| 112 | def key_matches(self, key): |
| 113 | if not self.known(): |
| 114 | return False |
| 115 | try: |
| 116 | with self.key_type_file.open() as fd: |
| 117 | type = fd.read() |
| 118 | return type == str(key.TYPE) |
| 119 | except OSError as exc: |
| 120 | logger.warning("Could not read/parse key type file: %s", exc) |
| 121 | |
| 122 | def save(self, manifest, key): |
| 123 | logger.debug("security: saving state for %s to %s", self.repository.id_str, str(self.dir)) |
no test coverage detected