Re: try/except in loop

2020-11-27 Thread Cameron Simpson
I had to do this with a different API the toehr year, and made this method: def auth_token(self): ''' Obtain a current auth token [...] Refreshes the cached token if stale. ''' while True: with self._auth_token_lock: token = self

Re: try/except in loop

2020-11-27 Thread Jason Friedman
> > >> I'm using the Box API ( >> https://developer.box.com/guides/tooling/sdks/python/). >> I can get an access token, though it expires after a certain amount of >> time. My plan is to store the access token on the filesystem and use it >> until it expires, then fetch a new one. In the example be

Re: try/except in loop

2020-11-27 Thread Bob Gailer
On Fri, Nov 27, 2020, 6:06 PM Jason Friedman wrote: > I'm using the Box API ( > https://developer.box.com/guides/tooling/sdks/python/). > I can get an access token, though it expires after a certain amount of > time. My plan is to store the access token on the filesystem and use it > until it exp