From f37109848f884b7e1cc7b0e9a2f8dd871b3be3ed Mon Sep 17 00:00:00 2001 From: Martin Hostettler Date: Tue, 15 Nov 2016 23:18:21 +0100 Subject: [PATCH] remote: Remove unused type variable. --- src/borg/remote.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/borg/remote.py b/src/borg/remote.py index 6894a729a..9a5221bfb 100644 --- a/src/borg/remote.py +++ b/src/borg/remote.py @@ -175,7 +175,8 @@ class RepositoryServer: # pragma: no cover args = decode_keys(unpacked[ARGS]) elif isinstance(unpacked, tuple) and len(unpacked) == 4: dictFormat = False - type, msgid, method, args = unpacked + # The first field 'type' was always 1 and has always been ignored + _, msgid, method, args = unpacked method = method.decode() args = self.positional_to_named(method, args) else: @@ -664,7 +665,8 @@ This problem will go away as soon as the server has been upgraded to 1.0.7+. if isinstance(unpacked, dict): msgid = unpacked[MSGID] elif isinstance(unpacked, tuple) and len(unpacked) == 4: - type, msgid, error, res = unpacked + # The first field 'type' was always 1 and has always been ignored + _, msgid, error, res = unpacked if error: # ignore res, because it is only a fixed string anyway. unpacked = {MSGID: msgid, b'exception_class': error}