Paramiko 1.10.0 breaks Paramiko backend

Bug #1156746 reported by Tilman Blumenbach
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Duplicity version: 0.6.21
Python version: 2.7.3
OS: Arch Linux
Target filesystem: Linux/ext4

Paramiko 1.10.0 breaks the Paramiko backend. For example, running

TMPDIR='/var/tmp' duplicity collection-status --name 'duply_main' --no-encryption --verbosity 'i' --exclude-if-present 'CACHEDIR.TAG' --full-if-older-than 2M --asynchronous-upload -v9 'ssh://root@ds/stor/workstations/h2g2-42'

using duply gives:

Using archive dir: /root/.cache/duplicity/duply_main
Using backup name: duply_main
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.u1backend Succeeded
Using temporary directory /var/tmp/duplicity-U58Wr8-tempdir
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1411, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1404, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1257, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/duplicity/commandline.py", line 1005, in ProcessCommandLine
    globals.backend = backend.get_backend(args[0])
  File "/usr/lib/python2.7/site-packages/duplicity/backend.py", line 161, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/lib/python2.7/site-packages/duplicity/backends/_ssh_paramiko.py", line 159, in __init__
    self.config['identityfile'])
  File "/usr/lib/python2.7/posixpath.py", line 252, in expanduser
    if not path.startswith('~'):
AttributeError: 'list' object has no attribute 'startswith'

The problem is that starting with version 1.10.0, Paramiko's SSH config parser allows multiple IdentityFile options per host, meaning that SSHParamikoBackend.config['identityfile'] is *always* a list now (earlier versions simply returned a string).

Branch with fix attached. Tested with Paramiko 1.9.0 and 1.10.0.

Related branches

description: updated
description: updated
description: updated
Changed in duplicity:
status: New → Fix Committed
Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.6.22
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.