Re: Handling an connection error with Twython

2019-06-01 Thread Cecil Westerhof
"Peter J. Holzer" writes: > On 2019-05-25 13:46:40 +0200, Cecil Westerhof wrote: >> Just changing the while loop to a for loop did not make sense to me, >> but this does. I now have: >> max_tries = 5 >> for current_try in range(1, max_tries): >> try: >> posted = twitte

Re: Handling an connection error with Twython

2019-06-01 Thread Peter J. Holzer
On 2019-05-25 13:46:40 +0200, Cecil Westerhof wrote: > Just changing the while loop to a for loop did not make sense to me, > but this does. I now have: > max_tries = 5 > for current_try in range(1, max_tries): > try: > posted = twitter.update_status(status = message, >

Re: Handling an connection error with Twython

2019-05-25 Thread Cecil Westerhof
MRAB writes: > On 2019-05-24 09:25, Cecil Westerhof wrote: >> Dennis Lee Bieber writes: >> >>> On Fri, 24 May 2019 07:49:23 +0200, Cecil Westerhof >>> declaimed the following: >>> I did not do that consciously, because I have to try until it is successful an I return, or I reached

Re: Handling an connection error with Twython

2019-05-24 Thread MRAB
On 2019-05-24 09:25, Cecil Westerhof wrote: Dennis Lee Bieber writes: On Fri, 24 May 2019 07:49:23 +0200, Cecil Westerhof declaimed the following: I did not do that consciously, because I have to try until it is successful an I return, or I reached the max tries and re-raise the exception.

Re: Handling an connection error with Twython

2019-05-24 Thread Cecil Westerhof
Dennis Lee Bieber writes: > On Fri, 24 May 2019 07:49:23 +0200, Cecil Westerhof > declaimed the following: > >> >>I did not do that consciously, because I have to try until it is >>successful an I return, or I reached the max tries and re-raise the >>exception. With a for loop I could exit the l

Re: Handling an connection error with Twython

2019-05-23 Thread Cecil Westerhof
MRAB writes: > On 2019-05-23 22:55, Cecil Westerhof wrote: >> Cecil Westerhof writes: >> >>> I am using Twython to post updates on Twitter. Lately there is now and >>> then a problem with my internet connection. I am using: >>> posted = twitter.update_status(status = message, >>>

Re: Handling an connection error with Twython

2019-05-23 Thread MRAB
On 2019-05-23 22:55, Cecil Westerhof wrote: Cecil Westerhof writes: I am using Twython to post updates on Twitter. Lately there is now and then a problem with my internet connection. I am using: posted = twitter.update_status(status = message, in_reply_to

Re: Handling an connection error with Twython

2019-05-23 Thread Cecil Westerhof
Cecil Westerhof writes: > I am using Twython to post updates on Twitter. Lately there is now and > then a problem with my internet connection. I am using: > posted = twitter.update_status(status = message, >in_reply_to_status_id = message_id, >

Handling an connection error with Twython

2019-05-23 Thread Cecil Westerhof
I am using Twython to post updates on Twitter. Lately there is now and then a problem with my internet connection. I am using: posted = twitter.update_status(status = message, in_reply_to_status_id = message_id, trim_user = T