Revision a7533bf3

b/kamaki/cli/commands/astakos.py
86 86
    @errors.user.authenticate
87 87
    def _run(self, custom_token=None):
88 88
        super(self.__class__, self)._run()
89
        r = self.client.authenticate(custom_token)
89
        token_bu = self.client.token
90
        try:
91
            r = self.client.authenticate(custom_token)
92
        except Exception:
93
            #recover old token
94
            self.client.token = token_bu
95
            raise
90 96
        self._print(r, self._print_access)
91 97

  
92 98
    def main(self, custom_token=None):

Also available in: Unified diff