Merge lp://staging/~tonyyarusso/update-notifier/bug-1167621 into lp://staging/update-notifier/ubuntu

Proposed by Tony Yarusso
Status: Work in progress
Proposed branch: lp://staging/~tonyyarusso/update-notifier/bug-1167621
Merge into: lp://staging/update-notifier/ubuntu
Diff against target: 146 lines (+65/-41)
1 file modified
data/apt_check.py (+65/-41)
To merge this branch: bzr merge lp://staging/~tonyyarusso/update-notifier/bug-1167621
Reviewer Review Type Date Requested Status
Martin Pitt Needs Fixing
Ubuntu Core Development Team Pending
Review via email: mp+158500@code.staging.launchpad.net

Description of the change

Make apt_check.py more suitable for calling as a module from another script (LP: #1167621)

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

Hey pitti, looks like this is up your street - fancy reviewing? :-)

(if not, let me know and I'll try to reason it out myself)

Revision history for this message
Martin Pitt (pitti) wrote :

8 -def write_package_names(outstream, cache, depcache):
9 +def write_package_names(cache, depcache, messages, standalone, delim="\n"):
10 " write out package names that change to outstream "

Can you please adjust the docstrings accordingly? Also, you should rename the methods, as they don't write anything any more. Perhaps get_package_names()? Also, it seems this function doesn't actually use the new "standalone" argument?

For write_human_readable_summary, please also document the two new arguments in the docstring. I think it's an unusual style to pass in "messages" and have the function return that plus some extra text; instead, concatenate the result of the two functions in the caller.

64 + "--delimeter",

It's "delimiter" (same typo again further down).

Thanks!

review: Needs Fixing
Revision history for this message
Sebastien Bacher (seb128) wrote :

(setting to "work in progress" so it drops from the sponsoring queue while being worked, please set it back to "needs review" again once you addressed the review comments)

Unmerged revisions

790. By Tony Yarusso <email address hidden>

Make apt_check.py more suitable for calling as a module from another script (LP: #1167621)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: