Revision f9d665e4 snf-django-lib/snf_django/lib/api/__init__.py

b/snf-django-lib/snf_django/lib/api/__init__.py
106 106
                # Authenticate
107 107
                if user_required:
108 108
                    assert(token_required), "Can not get user without token"
109
                    astakos = astakos_auth_url or settings.ASTAKOS_AUTH_URL
110
                    astakos = AstakosClient(token, astakos,
109
                    astakos_url = astakos_auth_url
110
                    if astakos_url is None:
111
                        try:
112
                            astakos_url = settings.ASTAKOS_AUTH_URL
113
                        except AttributeError:
114
                            logger.error("Cannot authenticate without having"
115
                                         " an Astakos Authentication URL")
116
                            raise
117
                    astakos = AstakosClient(token, astakos_url,
111 118
                                            use_pool=True,
112 119
                                            retry=2,
113 120
                                            logger=logger)

Also available in: Unified diff