Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Exception on Fail to connect to Internet #39

Closed
IsaacJReay opened this issue Sep 27, 2021 · 4 comments
Closed

Error Exception on Fail to connect to Internet #39

IsaacJReay opened this issue Sep 27, 2021 · 4 comments

Comments

@IsaacJReay
Copy link

the tzupdate binary when used with Internet works really well, and hat off to all the developers. But, there is still one nasty problems. Whenever there is no Internet connection for the socket to open to such as error resolving DNS, or no connected iinterface, it thrown out a nasty python script error, and it continued on to try to reconnect at lightening speed. Maybe developers team can put a lid to the loop like 3 loops, if still error, just print out an one line error telling us users that no Internet or more specific issues.

@cdown
Copy link
Owner

cdown commented Sep 27, 2021

It continued on to try to reconnect at lightening speed.

Huh? We don't try to reconnect at all, see here: https://github.com/cdown/tzupdate/blob/develop/tzupdate.py#L84

Why do you think we try to reconnect?

@IsaacJReay
Copy link
Author

I would like to make a apologies that I got impatient and not wait for the script to finish 30 seconds later, which I assumed that It would run indefinitely; hence the statement above. When run without Internet, It immediately give out a long list of python errors from 2 files, process.py and request.py . It then got quiet for a 30 seconds before it printed the final long errors saying tzupdate.TimezoneAcquisitionError: No usable response from any API in 30.0 seconds. Consider increasing --timeout if your connection is slow., and it terminated. In the log file below, I have put a row of hash in the place where it waited quietly. I was hoping that you would eliminate the long python error, and make it short and precise, or print the long one to somewhere else like a log file in /var/log/tzupdate or something you could find. Thanks.

tzupdate.log

@cdown
Copy link
Owner

cdown commented Sep 28, 2021

The full traceback can be useful to find the cause of issues, so I'm not going to remove it. It's also not going to go to /var/log: if the user wants that they can redirect stdout.

I'd be happy to review a patch which uses sentinel values to proactively determine when all available APIs have been exhausted, though. Feel free to send a pull request.

@cdown
Copy link
Owner

cdown commented May 12, 2023

No PR for 1.5 years, closing.

@cdown cdown closed this as completed May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants