Skip to content

Commit c69d219

Browse files
author
Vilhelm K. Vardøy
committed
Rename session property from conduit to _conduit to avoid conflict.
There's a few some-time useful calls (especially the ping method) in the conduit namespace which naming the property conduit disallows usage of.
1 parent 9d01378 commit c69d219

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

phabricator/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def validate_kwarg(key, target):
231231
raise ValueError('Wrong arguemnt type: %s is not a list of %ss' % (k, resource['required'][k][0]))
232232
raise ValueError('Wrong arguemnt type: %s is not a %s' % (k, resource['required'][k]))
233233

234-
conduit = self.api.conduit
234+
conduit = self.api._conduit
235235

236236
if conduit:
237237
# Already authenticated, add session key to json data
@@ -244,7 +244,7 @@ def validate_kwarg(key, target):
244244
else:
245245
# Authorization is required, silently auth the user
246246
self.api.connect()
247-
kwargs['__conduit__'] = self.api.conduit
247+
kwargs['__conduit__'] = self.api._conduit
248248

249249
url = urlparse.urlparse(self.api.host)
250250
if url.scheme == 'https':
@@ -305,7 +305,7 @@ def __init__(self, username=None, certificate=None, host=None,
305305
self.client = 'python-phabricator'
306306
self.clientVersion = 1
307307
self.clientDescription = socket.gethostname() + ':python-phabricator'
308-
self.conduit = None
308+
self._conduit = None
309309

310310
super(Phabricator, self).__init__(self)
311311

@@ -318,7 +318,7 @@ def connect(self):
318318
response = auth(user=self.username, host=self.host,
319319
client=self.client, clientVersion=self.clientVersion)
320320

321-
self.conduit = {
321+
self._conduit = {
322322
'sessionKey': response.sessionKey,
323323
'connectionID': response.connectionID
324324
}

0 commit comments

Comments
 (0)