def main(args): bs = get_binstar() auth = bs.authentication() bs.remove_authentication(auth['id']) remove_token() log.info("logout successful")
def main(args): bs = get_binstar(args) if bs.token: # TODO: named 'application' because I was using the github model # Change it to name once we release the latest version of binstar server bs.remove_authentication() remove_token(args) log.info("logout successful") else: log.info("You are not logged in")
def main(args): bs = get_binstar(args) if bs.token: # TODO: named 'application' because I was using the github model # Change it to name once we release the latest version of binstar server try: bs.remove_authentication() except errors.Unauthorized as err: log.debug("The token that you are trying to remove may not be valid" "{}".format(err)) remove_token(args) log.info("logout successful") else: log.info("You are not logged in")