diff --git a/keystoneauth1/extras/oauth1/_loading.py b/keystoneauth1/extras/oauth1/_loading.py index 20129f00..fa43232e 100644 --- a/keystoneauth1/extras/oauth1/_loading.py +++ b/keystoneauth1/extras/oauth1/_loading.py @@ -22,6 +22,10 @@ class V3OAuth1(loading.BaseIdentityLoader): def plugin_class(self): return v3.OAuth1 + @property + def available(self): + return v3.oauth1 is not None + def get_options(self): options = super(V3OAuth1, self).get_options() diff --git a/keystoneauth1/extras/oauth1/v3.py b/keystoneauth1/extras/oauth1/v3.py index bad801b5..98c768db 100644 --- a/keystoneauth1/extras/oauth1/v3.py +++ b/keystoneauth1/extras/oauth1/v3.py @@ -23,7 +23,10 @@ import logging -from oauthlib import oauth1 +try: + from oauthlib import oauth1 +except ImportError: + oauth1 = None from keystoneauth1.identity import v3