Changeset d71fd2 in indico


Ignore:
Timestamp:
04/27/12 15:33:38 (13 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
f9798f
Parents:
e12f77
git-author:
Alberto Resco Perez <alberto.resco.perez@…> (04/27/12 12:19:21)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (04/27/12 15:33:38)
Message:

[FIX] Get Export API URL when no api key

  • Change the type of exception raised
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/services/implementation/base.py

    rb60411 rd71fd2  
    502502        user = self._getUser() 
    503503        if not user: 
    504             raise ServiceError("ERR-U0", "User is not logged in!") 
     504            raise ServiceAccessError("User is not logged in!") 
    505505        apiKey = user.getAPIKey() 
    506506        if not apiKey: 
    507             raise ServiceError("ERR-U1", "User has no API key!") 
     507            raise ServiceAccessError("User has no API key!") 
    508508        elif apiKey.isBlocked(): 
    509             raise ServiceError("ERR-U1", "This API key is blocked!") 
     509            raise ServiceAccessError("This API key is blocked!") 
    510510        self._apiKey = apiKey 
Note: See TracChangeset for help on using the changeset viewer.