def fromPath(cls, path):
        self = cls(path)
        try:
            fp = path.open()
        except IOError:
            return self
        for line in fp:
            if line.startswith(HashedEntry.MAGIC):
                entry = HashedEntry.fromString(line)
            else:
                try:
                    entry = PlainEntry.fromString(line)
                except (DecodeError, InvalidEntry, BadKeyError):
                    entry = UnparsedEntry(line)
            self._entries.append(entry)
        return self
Terminate the service with a reason.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/client/knownhosts.py/KnownHostsFile.fromPath--crossover with--dataset/ETHPy150Open bfrog/whizzer/whizzer/rpc/service.py/Service.terminate