equal
deleted
inserted
replaced
268 """return a new anonymous session |
268 """return a new anonymous session |
269 |
269 |
270 raises an AuthenticationError if anonymous usage is not allowed |
270 raises an AuthenticationError if anonymous usage is not allowed |
271 """ |
271 """ |
272 anoninfo = vreg.config.anonymous_user() |
272 anoninfo = vreg.config.anonymous_user() |
273 if anoninfo is None: # no anonymous user |
273 if anoninfo[0] is None: # no anonymous user |
274 raise AuthenticationError('anonymous access is not authorized') |
274 raise AuthenticationError('anonymous access is not authorized') |
275 anon_login, anon_password = anoninfo |
275 anon_login, anon_password = anoninfo |
276 # use vreg's repository cache |
276 # use vreg's repository cache |
277 repo = vreg.config.repository(vreg) |
277 repo = vreg.config.repository(vreg) |
278 anon_cnx = _repo_connect(repo, anon_login, password=anon_password) |
278 anon_cnx = _repo_connect(repo, anon_login, password=anon_password) |