From 33d9d7d93e4e1b9fa1538ec54828a7c3a6730df9 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 26 Feb 2015 12:22:10 +0100 Subject: [PATCH] Convert to tuple before passing to requests Requests accesses the cert tuple like this: if isinstance(cert, basestring): a = cert else: a = cert[0] b = cert[1] On Python 3, map doesn't return a list, so (theoretically) this would fail. --- vdirsyncer/storage/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdirsyncer/storage/http.py b/vdirsyncer/storage/http.py index a5832c5..2159a10 100644 --- a/vdirsyncer/storage/http.py +++ b/vdirsyncer/storage/http.py @@ -41,7 +41,7 @@ def prepare_client_cert(cert): if isinstance(cert, (text_type, bytes)): cert = expand_path(cert) elif isinstance(cert, list): - cert = map(prepare_client_cert, cert) + cert = tuple(map(prepare_client_cert, cert)) return cert