Skip to content

Commit

Permalink
cross-python 2/3 assertion if object is of string type.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Jan 16, 2018
1 parent a992d1f commit d1ac819
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/authnz/psa_authnz.py
@@ -1,3 +1,5 @@
import six

from social_core.actions import do_auth, do_complete, do_disconnect
from social_core.backends.utils import get_backend
from social_core.strategy import BaseStrategy
Expand Down Expand Up @@ -149,7 +151,7 @@ def disconnect(self, provider, trans, disconnect_redirect_url=None, association_
strategy = Strategy(trans, Storage, self.config)
backend = self._load_backend(strategy, self.config['redirect_uri'])
response = do_disconnect(backend, self._get_current_user(trans), association_id)
if isinstance(response, basestring):
if isinstance(response, six.string_types):
return True, "", response
return response.get('success', False), response.get('message', ""), ""

Expand Down

0 comments on commit d1ac819

Please sign in to comment.