Skip to content

Commit b2e2463

Browse files
author
Burak Yigit Kaya
committed
Remove deprecated has_key usage
1 parent 9f5a550 commit b2e2463

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

phabricator/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def __init__(self, username=None, certificate=None, host=None,
326326
# Set values in ~/.arcrc as defaults
327327
if ARCRC:
328328
self.host = host if host else ARCRC['hosts'].keys()[0]
329-
if token or ARCRC['hosts'][self.host].has_key('token'):
329+
if token or 'token' in ARCRC['hosts'][self.host]:
330330
self.token = token if token else ARCRC['hosts'][self.host]['token']
331331
else:
332332
self.username = username if username else ARCRC['hosts'][self.host]['user']
@@ -358,8 +358,12 @@ def connect(self):
358358

359359
auth = Resource(api=self, method='conduit', endpoint='connect')
360360

361-
response = auth(user=self.username, host=self.host,
362-
client=self.client, clientVersion=self.clientVersion)
361+
response = auth(
362+
user=self.username,
363+
host=self.host,
364+
client=self.client,
365+
clientVersion=self.clientVersion
366+
)
363367

364368
self._conduit = {
365369
'sessionKey': response.sessionKey,

0 commit comments

Comments
 (0)