Merge lp:~techtonik/ubuntu-dev-tools/minor-python3-fix into lp:~ubuntu-dev/ubuntu-dev-tools/trunk

Proposed by anatoly techtonik
Status: Merged
Merged at revision: 1460
Proposed branch: lp:~techtonik/ubuntu-dev-tools/minor-python3-fix
Merge into: lp:~ubuntu-dev/ubuntu-dev-tools/trunk
Diff against target: 50 lines (+6/-6)
1 file modified
backportpackage (+6/-6)
To merge this branch: bzr merge lp:~techtonik/ubuntu-dev-tools/minor-python3-fix
Reviewer Review Type Date Requested Status
Benjamin Drung Approve
Review via email: mp+247538@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Benjamin Drung (bdrung) wrote :

Looks good to me.

The "as e" is not needed in the second chunk if the variable is not used afterwards.

review: Approve
Revision history for this message
anatoly techtonik (techtonik) wrote :

I see. Without bug #1415393 this gonna be complicated.

$ bzr checkout https://code.launchpad.net/~techtonik/ubuntu-dev-tools/minor-python3-fix/+merge/247538
 - didn't work with "bzr: ERROR: Not a branch: ..."

$ bzr checkout https://code.launchpad.net/~techtonik/ubuntu-dev-tools/minor-python3-fix
$ cd minor-python3-fix/
$ vim backportpackage
$ bzr commit
bzr: ERROR: Cannot lock LockDir(http://bazaar.launchpad.net/~techtonik/ubuntu-dev-tools/minor-python3-fix/.bzr/branch/lock): Transport operation not possible: http does not support mkdir()

??? =(

I was actually trying to fix https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1247539 but run out of time, so what you see is not the code I intended to ship.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Created bug #1415405.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'backportpackage'
2--- backportpackage 2013-07-12 20:38:32 +0000
3+++ backportpackage 2015-01-25 20:41:35 +0000
4@@ -182,7 +182,7 @@
5 archive = Distribution(distribution.lower()).getArchive()
6 try:
7 spph = archive.getSourcePackage(package, source_release)
8- except (SeriesNotFoundException, PackageNotFoundException), e:
9+ except (SeriesNotFoundException, PackageNotFoundException) as e:
10 error(str(e))
11 version = spph.getVersion()
12
13@@ -240,7 +240,7 @@
14 ('Release', 'Security', 'Updates',
15 'Proposed', 'Backports'))
16 return pkg.getVersion()
17- except (SeriesNotFoundException, PackageNotFoundException), e:
18+ except (SeriesNotFoundException, PackageNotFoundException) as e:
19 pass
20
21 def get_backport_dist(release, release_pocket):
22@@ -265,8 +265,8 @@
23 os.path.join(workdir, "buildresult"))
24
25 def do_upload(workdir, package, bp_version, changes, upload, prompt):
26- print 'Please check %s %s in file://%s carefully!' % \
27- (package, bp_version, workdir)
28+ print('Please check %s %s in file://%s carefully!' % \
29+ (package, bp_version, workdir))
30 if prompt or upload == 'ubuntu':
31 question = 'Do you want to upload the package to %s' % upload
32 answer = YesNoQuestion().ask(question, "yes")
33@@ -295,7 +295,7 @@
34 not headers['content-location'].
35 startswith('https://launchpadlibrarian.net')):
36 return True
37- except HttpLib2Error, e:
38+ except HttpLib2Error as e:
39 Logger.info(e)
40 return True
41 return False
42@@ -406,7 +406,7 @@
43 opts.upload,
44 opts.keyid,
45 opts.prompt)
46- except DownloadError, e:
47+ except DownloadError as e:
48 error(str(e))
49 finally:
50 if not opts.workdir: