[Bug 2150439] Re: Refactor UpdateManager.py: improve logging, structure, and error handling

Arnab Patra 2150439 at bugs.launchpad.net
Thu Apr 30 08:29:08 UTC 2026


Thanks for the feedback, that makes sense.

I understand that the patch is quite large and includes stylistic
changes that increase the review effort. I’ll avoid broad refactoring
going forward and focus on smaller, targeted improvements.

While reviewing the code, I did notice a couple of minor issues that
might be worth addressing individually:

- There are still a few places where `print` is used instead of logging
(e.g. in `_fetch_ua_updates` in the original code), which can make
debugging and log collection less consistent.

- Some exceptions are silently ignored (e.g. `except SystemError:
pass`), which could potentially hide failures and make issues harder to
trace.

If these are considered worthwhile, I can prepare small, focused patches
for them instead of a larger refactor.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/2150439

Title:
  Refactor UpdateManager.py: improve logging, structure, and error
  handling

Status in update-manager package in Ubuntu:
  New

Bug description:
  This patch refactors UpdateManager.py to improve readability,
  maintainability, and robustness.

  Changes include:
  - Structured imports into logical sections
  - Added docstrings for better documentation
  - Replaced print statements with logging
  - Improved exception handling
  - Safer attribute access using getattr

  No functional changes are intended.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/2150439/+subscriptions





More information about the foundations-bugs mailing list