From 121214927693d2acd9b75c6d8de08cfe40053315 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= <danmichaelo@gmail.com>
Date: Sun, 26 Jul 2015 22:27:41 +0200
Subject: [PATCH] Fix custom login cookies

I've no idea when this would actually be needed, but at least it should be fixed now.. It broke during the move to use the requests library.
---
 mwclient/client.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mwclient/client.py b/mwclient/client.py
index a3b072a..74e6d40 100644
--- a/mwclient/client.py
+++ b/mwclient/client.py
@@ -363,9 +363,7 @@ class Site(object):
         if username and password:
             self.credentials = (username, password, domain)
         if cookies:
-            if self.host not in self.conn.cookies:
-                self.conn.cookies[self.host] = http.CookieJar()
-            self.conn.cookies[self.host].update(cookies)
+            self.connection.cookies.update(cookies)
 
         if self.credentials:
             sleeper = self.sleepers.make()
-- 
GitLab