Commit 9e8e1eab authored by Vincent Pelletier's avatar Vincent Pelletier

Use a local variable when possible.

Your brain should pop out through your eyes already: this code is setting
a *class* property. On a class which is used as a base class everywhere in
this file. Mouhaha. *sob*
parent 215751ae
......@@ -580,15 +580,14 @@ class slap:
def _initialiseConnectionHelper(self, slapgrid_uri, key_file, cert_file,
master_ca_file, timeout):
SlapDocument._slapgrid_uri = slapgrid_uri
scheme, netloc, path, query, fragment = urlparse.urlsplit(
SlapDocument._slapgrid_uri)
slapgrid_uri)
if not(query == '' and fragment == ''):
raise AttributeError('Passed URL %r issue: not parseable'%
SlapDocument._slapgrid_uri)
slapgrid_uri)
if scheme not in ('http', 'https'):
raise AttributeError('Passed URL %r issue: there is no support for %r p'
'rotocol' % (SlapDocument._slapgrid_uri, scheme))
'rotocol' % (slapgrid_uri, scheme))
if scheme == 'http':
connection_wrapper = httplib.HTTPConnection
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment