On Tue, Aug 24, 2010 at 4:54 PM, Michael Hanselmann <[email protected]> wrote:
> Am 24. August 2010 16:51 schrieb René Nussbaumer <[email protected]>:
>> --- a/tools/setup-ssh
>> +++ b/tools/setup-ssh
>> +def LoadKnownHosts():
>> + """Loads the known hosts
>> +
>> + �...@return L{paramiko.util.load_host_keys} dict
>> +
>> + """
>> + homedir = utils.GetHomeDir(constants.GANETI_RUNAS)
>> + known_hosts = os.path.join(homedir, ".ssh", "known_hosts")
>> +
>> + try:
>> + return paramiko.util.load_host_keys(known_hosts)
>> + except IOError:
>> + # We didn't found the patch, silently ignore and return an empty dict
>
> s/patch/path/? Log the error. Use EnvironmentError.
Yepp, typo, thanks! Done
> except EnvironmentError:
> # …
> logging.exception("…")
You think logging is needed? It's just … that we didn't found it and
we can completely recover from that situation.
René