Patchwork [2,of,2] bugzilla: pass the url to xmlrpclib.ServerProxy as str

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 7, 2020, 9:30 p.m.
Message ID <6473ac822f918193dd39.1607376605@xps.local>
Download mbox | patch
Permalink /patch/47820/
State Accepted
Headers show

Comments

Mads Kiilerich - Dec. 7, 2020, 9:30 p.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1607032141 -3600
#      Thu Dec 03 22:49:01 2020 +0100
# Branch stable
# Node ID 6473ac822f918193dd39f43f054695d5d6321736
# Parent  a141d1da33433998590be226b6788fb53e8c90e0
bugzilla: pass the url to xmlrpclib.ServerProxy as str

Patch

diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py
--- a/hgext/bugzilla.py
+++ b/hgext/bugzilla.py
@@ -759,7 +759,9 @@  class bzxmlrpc(bzaccess):
         self.fixstatus = self.ui.config(b'bugzilla', b'fixstatus')
         self.fixresolution = self.ui.config(b'bugzilla', b'fixresolution')
 
-        self.bzproxy = xmlrpclib.ServerProxy(bzweb, self.transport(bzweb))
+        self.bzproxy = xmlrpclib.ServerProxy(
+            pycompat.strurl(bzweb), self.transport(bzweb)
+        )
         ver = self.bzproxy.Bugzilla.version()[b'version'].split(b'.')
         self.bzvermajor = int(ver[0])
         self.bzverminor = int(ver[1])