Merge lp://staging/~vorlon/python-apt/pre-release-py3-ubuntu into lp://staging/~ubuntu-core-dev/python-apt/ubuntu

Proposed by Steve Langasek
Status: Merged
Approved by: Barry Warsaw
Approved revision: 470
Merge reported by: Steve Langasek
Merged at revision: not available
Proposed branch: lp://staging/~vorlon/python-apt/pre-release-py3-ubuntu
Merge into: lp://staging/~ubuntu-core-dev/python-apt/ubuntu
Diff against target: 52 lines (+17/-6)
3 files modified
debian/changelog (+9/-0)
pre-build.sh (+3/-0)
utils/get_ubuntu_mirrors_from_lp.py (+5/-6)
To merge this branch: bzr merge lp://staging/~vorlon/python-apt/pre-release-py3-ubuntu
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Review via email: mp+109733@code.staging.launchpad.net

Description of the change

branch to port pre-build.sh to python3 (at least half of it - the other half
needs python3-debian), and to make pre-build.sh behave more sensibly when
source-build-deps are missing

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

On Jun 11, 2012, at 08:53 PM, Steve Langasek wrote:

>Steve Langasek has proposed merging lp:~vorlon/python-apt/pre-release-py3-ubuntu into lp:~ubuntu-core-dev/python-apt/ubuntu.
>
>Requested reviews:
> Canonical Foundations Team (canonical-foundations)
>
>For more details, see:
>https://code.launchpad.net/~vorlon/python-apt/pre-release-py3-ubuntu/+merge/109733
>
>branch to port pre-build.sh to python3 (at least half of it - the other half
>needs python3-debian), and to make pre-build.sh behave more sensibly when
>source-build-deps are missing

=== modified file 'utils/get_ubuntu_mirrors_from_lp.py'
--- utils/get_ubuntu_mirrors_from_lp.py 2011-08-11 13:38:04 +0000
+++ utils/get_ubuntu_mirrors_from_lp.py 2012-06-11 20:52:18 +0000
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
> #
> # get_ubuntu_lp_mirrors.py
> #
> @@ -40,9 +40,8 @@
> countries[countrycode].add(link.href)
>
>
> -keys = countries.keys()
> -keys.sort()
> -print "mirror://mirrors.ubuntu.com/mirrors.txt"
> +keys = sorted(countries.keys())

Actually, you don't need the .keys() here since iteration over a dictionary by
definition iterates over its keys. So

    keys = sorted(countries)

is the standard idiom.

> +print("mirror://mirrors.ubuntu.com/mirrors.txt")
> for country in keys:
> - print "#LOC:%s" % country
> - print "\n".join(sorted(countries[country]))
> + print("#LOC:%s" % country)
> + print("\n".join(sorted(countries[country])))

Revision history for this message
Barry Warsaw (barry) :
review: Approve
Revision history for this message
Barry Warsaw (barry) wrote :

With the suggested change... approved.

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: