Hi! When the internet connection isn´t available during connection time boto3 throws an Connection Error. Unfortunately apt only hangs during apt-get update & apt-get install (on my ubuntu16 machine).
If you add
except botocore.exceptions.EndpointConnectionError as e:
self.send(Message(MessageHeaders.URI_FAILURE, (
('Message', e),
('URI', uri),
)))
raise e
to the try/except of *s3_response = s3_object.get(*s3_request) it will fail better.
By the Way, is there a better way than raising the Exception there?
Furthermore if the internet connection breaks during package download, apt also hangs up
bytes = s3_response['Body'].read(16 1024)* throws an ReadTimeout
If you put there:
try:
bytes = s3_response['Body'].read(16 * 1024)
except Exception as e:
self.send(Message(MessageHeaders.URI_FAILURE, (
('Message', e),
('URI', uri),
)))
raise e
it will fail (whats correctly, if the internet is broken?!
Hi! When the internet connection isn´t available during connection time boto3 throws an Connection Error. Unfortunately apt only hangs during apt-get update & apt-get install (on my ubuntu16 machine).
If you add
to the try/except of *s3_response = s3_object.get(*s3_request) it will fail better. By the Way, is there a better way than raising the Exception there?
Furthermore if the internet connection breaks during package download, apt also hangs up bytes = s3_response['Body'].read(16 1024)* throws an ReadTimeout If you put there:
it will fail (whats correctly, if the internet is broken?!