Skip to content

Commit

Permalink
allow the user to set the cookie file and user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh committed Mar 8, 2011
1 parent cce566d commit 9ef2368
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyzilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ def info(self):
return self._parse_response(h.getfile(), sock)

class BugZilla(xmlrpclib.Server):
def __init__(self, url, verbose = False):
def __init__(self, url, verbose = False, cookiefile = None,
user_agent=None):
xmlrpclib.Server.__init__(self, url, CookieAuthXMLRPCTransport(),
verbose = verbose)
verbose = verbose,
cookiefile = cookiefile,
user_agent = user_agent)

def login(self, username, password):
self.User.login (dict(login=username,
Expand Down

0 comments on commit 9ef2368

Please sign in to comment.