Ubuntu 19.10 TypeError: Cannot use string pattern on bytes-like object (lp:#1851951)

[Original report](https://bugs.launchpad.net/bugs/1851951) created by **Mike Doneske (mdoneske)**
```
Duplicity Version: 0.8.04
Python Version: Python3 3.7.5rc1
Ubuntu 19.10
Target Filesystem: Linux

Using archive dir:
/home/mike/.cache/duplicity/ab8846365d1058b163dab4ef33567f9b
Using backup name: ab8846365d1058b163dab4ef33567f9b
GPG binary is gpg, version (2, 2, 12)
Import of duplicity.backends.adbackend Succeeded
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.jottacloudbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pcabackend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
/usr/lib/python3/dist-
packages/duplicity/backends/ssh_paramiko_backend.py:409: ResourceWarning:
unclosed file <_io.TextIOWrapper name='/etc/ssh/ssh_config' mode='r'
encoding='UTF-8'>
  sshconfig.parse(open(file))
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ssh: starting thread (client mode): 0xf211ba90
ssh: Local version/idstring: SSH-2.0-paramiko_2.6.0
ssh: Remote version/idstring: SSH-2.0-OpenSSH_7.9p1 Ubuntu-10
ssh: Connected (version 2.0, client OpenSSH_7.9p1)
ssh: kex algos:['curve25519-sha256', 'curve25519-sha256@libssh.org', 'ecdh-
sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-
hellman-group-exchange-sha256', 'diffie-hellman-group16-sha512', 'diffie-
hellman-group18-sha512', 'diffie-hellman-group14-sha256', 'diffie-hellman-
group14-sha1'] server key:['rsa-sha2-512', 'rsa-sha2-256', 'ssh-rsa',
'ecdsa-sha2-nistp256', 'ssh-ed25519'] client
encrypt:['chacha20-poly1305@openssh.com', 'aes128-ctr', 'aes192-ctr',
'aes256-ctr', 'aes128-gcm@openssh.com', 'aes256-gcm@openssh.com'] server
encrypt:['chacha20-poly1305@openssh.com', 'aes128-ctr', 'aes192-ctr',
'aes256-ctr', 'aes128-gcm@openssh.com', 'aes256-gcm@openssh.com'] client
mac:['umac-64-etm@openssh.com', 'umac-128-etm@openssh.com', 'hmac-
sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com', 'hmac-
sha1-etm@openssh.com', 'umac-64@openssh.com', 'umac-128@openssh.com',
'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] server
mac:['umac-64-etm@openssh.com', 'umac-128-etm@openssh.com', 'hmac-
sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com', 'hmac-
sha1-etm@openssh.com', 'umac-64@openssh.com', 'umac-128@openssh.com',
'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] client compress:['none',
'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client
lang:[''] server lang:[''] kex follows?False
ssh: Kex agreed: curve25519-sha256@libssh.org
ssh: HostKey agreed: ecdsa-sha2-nistp256
ssh: Cipher agreed: aes128-ctr
ssh: MAC agreed: hmac-sha2-256
ssh: Compression agreed: none
ssh: kex engine KexCurve25519 specified hash_algo <built-in function
openssl_sha256>
ssh: Switch to new keys ...
ssh: userauth is OK
ssh: Authentication (password) successful!
ssh: [chan 0] Max packet in: 32768 bytes
ssh: Received global request "hostkeys-00@openssh.com"
ssh: Rejecting "hostkeys-00@openssh.com" global request from server.
ssh: [chan 0] Max packet out: 32768 bytes
ssh: Secsh channel 0 opened.
ssh: [chan 0] Sesch channel 0 request ok
ssh: [chan 0] EOF received (0)
ssh: [chan 0] EOF sent (0)
Reading globbing filelist /home/mike/backup_filelist
Main action: inc
Acquiring lockfile
b'/home/mike/.cache/duplicity/ab8846365d1058b163dab4ef33567f9b/lockfile'
================================================================================
duplicity $version ($reldate)
Args: /usr/bin/duplicity --verbosity debug --asynchronous-upload --include-
filelist /home/mike/backup_filelist --volsize 500 /
scp://mike@192.168.1.57//backups/golf
Linux golf 5.3.0-19-generic #20-Ubuntu SMP Fri Oct 18 09:04:39 UTC 2019
x86_64 x86_64
/usr/bin/python3 3.7.5rc1 (default, Oct  8 2019, 16:47:45)
[GCC 9.2.1 20191008]
================================================================================

Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Jul 19 05:00:03 2019
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive dir: /home/mike/.cache/duplicity/ab8846365d1058b163dab4ef33567f9b

Found 0 secondary backup chains.

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Fri Jul 19 05:00:03 2019
Chain end time: Fri Oct 18 05:00:01 2019
Number of contained backup sets: 14
Total number of contained volumes: 58
 Type of backup set:                            Time:      Num volumes:
                Full         Fri Jul 19 05:00:03 2019                 5
         Incremental         Fri Jul 26 05:00:02 2019                20
         Incremental         Fri Aug  2 05:00:02 2019                 1
         Incremental         Fri Aug  9 05:00:01 2019                 1
         Incremental         Fri Aug 16 05:00:02 2019                 2
         Incremental         Fri Aug 23 05:00:03 2019                 1
         Incremental         Fri Aug 30 05:00:01 2019                 1
         Incremental         Fri Sep  6 05:00:02 2019                 1
         Incremental         Fri Sep 13 05:00:02 2019                 2
         Incremental         Fri Sep 20 05:00:04 2019                17
         Incremental         Fri Sep 27 05:00:03 2019                 2
         Incremental         Fri Oct  4 05:00:02 2019                 3
         Incremental         Fri Oct 11 05:00:02 2019                 1
         Incremental         Fri Oct 18 05:00:01 2019                 1
-------------------------
No orphaned or incomplete backup sets found.
Registering (mktemp) temporary file /tmp/duplicity-77dapwv4-tempdir/mktemp-
ylgpl9mx-2
ssh: [chan 3] Max packet in: 32768 bytes
ssh: [chan 3] Max packet out: 32768 bytes
ssh: Secsh channel 3 opened.
ssh: [chan 3] Sesch channel 3 request ok
ssh: [chan 3] EOF received (3)
Backtrace of previous error: Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 371, in
inner_retry
    return fn(self, *args)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 554, in
get
    self.backend._get(remote_filename, local_path)
  File "/usr/lib/python3/dist-
packages/duplicity/backends/ssh_paramiko_backend.py", line 338, in _get
    m = re.match(r"C([0-7]{4})\s+(\d+)\s+(\S.*)$", msg)
  File "/usr/lib/python3.7/re.py", line 173, in match
    return _compile(pattern, flags).match(string)
 TypeError: cannot use a string pattern on a bytes-like object

ssh: [chan 3] EOF sent (3)
Attempt 1 failed. TypeError: cannot use a string pattern on a bytes-like
object
ssh: Sending global request "keepalive@lag.net"
ssh: [chan 4] Max packet in: 32768 bytes
ssh: [chan 4] Max packet out: 32768 bytes
ssh: Secsh channel 4 opened.
ssh: [chan 4] Sesch channel 4 request ok
Backtrace of previous error: Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 371, in
inner_retry
    return fn(self, *args)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 554, in
get
    self.backend._get(remote_filename, local_path)
  File "/usr/lib/python3/dist-
packages/duplicity/backends/ssh_paramiko_backend.py", line 338, in _get
    m = re.match(r"C([0-7]{4})\s+(\d+)\s+(\S.*)$", msg)
  File "/usr/lib/python3.7/re.py", line 173, in match
    return _compile(pattern, flags).match(string)
 TypeError: cannot use a string pattern on a bytes-like object

Attempt 2 failed. TypeError: cannot use a string pattern on a bytes-like
object
ssh: [chan 4] EOF received (4)
ssh: [chan 4] EOF sent (4)
ssh: Sending global request "keepalive@lag.net"
ssh: [chan 5] Max packet in: 32768 bytes
ssh: [chan 5] Max packet out: 32768 bytes
ssh: Secsh channel 5 opened.
ssh: [chan 5] Sesch channel 5 request ok
ssh: [chan 5] EOF received (5)
ssh: [chan 5] EOF sent (5)
Backtrace of previous error: Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 371, in
inner_retry
    return fn(self, *args)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 554, in
get
    self.backend._get(remote_filename, local_path)
  File "/usr/lib/python3/dist-
packages/duplicity/backends/ssh_paramiko_backend.py", line 338, in _get
    m = re.match(r"C([0-7]{4})\s+(\d+)\s+(\S.*)$", msg)
  File "/usr/lib/python3.7/re.py", line 173, in match
    return _compile(pattern, flags).match(string)
 TypeError: cannot use a string pattern on a bytes-like object

Attempt 3 failed. TypeError: cannot use a string pattern on a bytes-like
object
ssh: Sending global request "keepalive@lag.net"
ssh: [chan 6] Max packet in: 32768 bytes
ssh: [chan 6] Max packet out: 32768 bytes
ssh: Secsh channel 6 opened.
ssh: [chan 6] Sesch channel 6 request ok
ssh: [chan 6] EOF received (6)
Backtrace of previous error: Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 371, in
inner_retry
    return fn(self, *args)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 554, in
get
    self.backend._get(remote_filename, local_path)
  File "/usr/lib/python3/dist-
packages/duplicity/backends/ssh_paramiko_backend.py", line 338, in _get
    m = re.match(r"C([0-7]{4})\s+(\d+)\s+(\S.*)$", msg)
  File "/usr/lib/python3.7/re.py", line 173, in match
    return _compile(pattern, flags).match(string)
 TypeError: cannot use a string pattern on a bytes-like object
```

Story points: 12.0