217 self.__clearFingerprints() |
217 self.__clearFingerprints() |
218 fingerprints = self.__assembleFingerprints() |
218 fingerprints = self.__assembleFingerprints() |
219 for host in fingerprints: |
219 for host in fingerprints: |
220 key = "{0}:fingerprints".format(host) |
220 key = "{0}:fingerprints".format(host) |
221 self.__config["hostsecurity"][key] = \ |
221 self.__config["hostsecurity"][key] = \ |
222 "\\\n" + ", \\\n".join(fingerprints[host]) |
222 ", ".join(fingerprints[host]) |
223 else: |
223 else: |
224 if "hostsecurity" in self.__config: |
224 if "hostsecurity" in self.__config: |
225 self.__clearFingerprints() |
225 self.__clearFingerprints() |
226 if len(self.__config.options("hostsecurity")) == 0: |
226 if len(self.__config.options("hostsecurity")) == 0: |
227 del self.__config["hostsecurity"] |
227 del self.__config["hostsecurity"] |