@@ -37,7 +37,7 @@ class NovellBugzilla(Bugzilla34):
3737 pass
3838
3939
40- def getBugzillaClassForURL (url , sslverify ):
40+ def _getBugzillaClassForURL (url , sslverify ):
4141 url = Bugzilla3 .fix_url (url )
4242 log .debug ("Detecting subclass for %s" , url )
4343 s = ServerProxy (url , _RequestsTransport (url , sslverify = sslverify ))
@@ -99,29 +99,18 @@ def getBugzillaClassForURL(url, sslverify):
9999class Bugzilla (_BugzillaBase ):
100100 '''
101101 Magical Bugzilla class that figures out which Bugzilla implementation
102- to use and uses that. Requires 'url' parameter so we can check available
103- XMLRPC methods to determine the Bugzilla version.
102+ to use and uses that.
104103 '''
105- # pylint: disable=W0231
106- # __init__ method of base class not called
107-
108- def __init__ (self , ** kwargs ):
109- log .info ("Bugzilla v%s initializing" , __version__ )
110- if 'url' not in kwargs :
104+ def _init_class_from_url (self , url , sslverify ):
105+ if url is None :
111106 raise TypeError ("You must pass a valid bugzilla URL" )
112107
113- # pylint: disable=W0233
114- # Use of __init__ of non parent class
115- # We base of _BugzillaBase to help pylint figure things out
116-
117- c = getBugzillaClassForURL (kwargs ['url' ],
118- kwargs .get ('sslverify' , True ))
108+ c = _getBugzillaClassForURL (url , sslverify )
119109 if not c :
120110 raise ValueError ("Couldn't determine Bugzilla version for %s" %
121- kwargs [ ' url' ] )
111+ url )
122112
123113 self .__class__ = c
124- c .__init__ (self , ** kwargs )
125114 log .info ("Chose subclass %s v%s" , c .__name__ , c .version )
126115
127116
0 commit comments