Skip to content

Commit 47b563b

Browse files
author
KP
committed
Merge pull request shotgunsoftware#39 from shotgunsoftware/20856_make_authenticate_human_user_nonsticky
Make sure to reset user_login/user_password after authentication. #20856
2 parents b459de7 + af3b6bb commit 47b563b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

shotgun_api3/shotgun.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,13 +1171,10 @@ def authenticate_human_user(self, user_login, user_password):
11711171

11721172
try:
11731173
data = self.find_one('HumanUser', [['sg_status_list', 'is', 'act'], ['login', 'is', user_login]], ['id', 'login'], '', 'all')
1174-
if data:
1175-
return data
1176-
else:
1177-
None
11781174
# Set back to default - There finally and except cannot be used together in python2.4
11791175
self.config.user_login = None
11801176
self.config.user_password = None
1177+
return data
11811178
except Fault:
11821179
# Set back to default - There finally and except cannot be used together in python2.4
11831180
self.config.user_login = None

0 commit comments

Comments
 (0)