Package: obnam
Version: 1.8-1
Severity: important

Each connection to remote host fails with the following traceback:

# obnam --no-quiet --config /etc/obnam/config.conf list-keys

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 190, in _run
    self.process_args(args)
  File "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line 201, in
process_args
    cliapp.Application.process_args(self, args)
  File "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 567, in
process_args
    method(args[1:])
  File "/usr/lib/python2.7/dist-
packages/obnamlib/plugins/encryption_plugin.py", line 229, in list_keys
    repo = self.app.get_repository_object()
  File "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line 235, in
get_repository_object
    repofs.connect()
  File
"/usr/lib/python2.7/dist-packages/obnamlib/plugins/sftp_plugin.py", line
188, in connect
    self._connect_paramiko()
  File
"/usr/lib/python2.7/dist-packages/obnamlib/plugins/sftp_plugin.py", line
245, in _connect_paramiko
    self._check_host_key(self.host)
  File
"/usr/lib/python2.7/dist-packages/obnamlib/plugins/sftp_plugin.py", line
273, in _check_host_key
    if not known_keys.has_key(offered_type):
AttributeError: 'SubDict' object has no attribute 'has_key'

Content of /etc/obnam/config.conf:
---------------
[config]
client-name: *****.cirrax.com
repository: sftp://*****@*****.cirrax.com/srv/obnam/backup
exclude:
keep: 30d,8w,12m
encrypt-with: Backup Encryption Key for ******.cirrax.com
weak-random: true
log: syslog
log-level: warning
ssh-key: /etc/obnam/ssh.key
ssh-known-hosts: /etc/ssh/ssh_known_hosts
strict-ssh-host-keys: true
pure-paramiko: true
---------------

To fix, change line #273 in file /usr/lib/python2.7/dist-
packages/obnamlib/plugins/sftp_plugin.py:

- if not known_keys.has_key(offered_type):
+ if offered_type not in known_keys:

This is also fixed upstream with commit
4417aee6f26adabc46552b53481656d9e37281b1

-- System Information:
Debian Release: 8.1

Reply via email to