File 0001-Use-LWPCookieJar-by-default.patch of Package python-bugzilla

From 78a52828f8eab7028a3df5613645213ec761aa70 Mon Sep 17 00:00:00 2001
From: Michal Vyskocil <mvyskocil@suse.cz>
Date: Tue, 21 Jul 2009 15:46:07 +0200
Subject: [PATCH 1/2] Use LWPCookieJar by default.

The MozillaCookieJar format is not standard and cannot store
informations about expires necassary for NovellBugzilla. This
patch changes the default loader to LWPCookieJar with fallaback to
MozillaCookieJar if it fails.
---
 bugzilla/base.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/bugzilla/base.py b/bugzilla/base.py
index 5becb43..56d1faf 100644
--- a/bugzilla/base.py
+++ b/bugzilla/base.py
@@ -140,7 +140,11 @@ class BugzillaBase(object):
         del self.cookiefile
         self._cookiefile = cookiefile
 
-        cj = cookielib.MozillaCookieJar(self._cookiefile)
+        try:
+            cj = cookielib.LWPCookieJar(self._cookiefile)
+        except LoadError, le:
+            cj = cookielib.MozillaCookieJar(self._cookiefile)
+
         if not self._cookiefile:
             self._persist_cookie = False
             # Create a temporary cookie file
-- 
1.6.3.3