[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1053712: python3-apt: Please make network errors downloading changelogs visible to caller



Package: python3-apt
Version: 2.6.0ubuntu1
Severity: normal

My use case of apt.package.Package.get_changelog needs to know whether
a changelog failed to download because it is not available on the
server vs. it failed because of a connectivity issue with the server.
Right now the function completely masks that information, simply
returning a string in both cases. I can't try to parse the string to
extract the information because it's not always explicit and because
it's internationalized so that's a whole can of worms.

I know you probably can't change the default behavior of the
get_changelog function because too many things depend on it, but two
other options would be to (a) add a lower-level function that just
tries to do the download and lets exceptions bubble up instead of
catching them and turning them into strings, or (b) add a keyword
argument to get_changelog which enables bubbling up exceptions instead
of converting them to strings.

Thank you,

Jonathan Kamens


Reply to: