1
=== modified file 'setup.py'
2
Index: lptools-0.2.0/setup.py
3
===================================================================
4
--- lptools-0.2.0.orig/setup.py
5
+++ lptools-0.2.0/setup.py
6
@@ -4,7 +4,8 @@ from glob import glob
7
from distutils.core import setup
10
-description = file(os.path.join(os.path.dirname(__file__), 'README'), 'rb').read()
11
+with open(os.path.join(os.path.dirname(__file__), 'README'), 'r') as f:
12
+ description = f.read()
16
@@ -20,7 +21,7 @@ setup(
17
'templates/recipe-status.html'])],
19
scripts=glob('bin/*'),
22
'Development Status :: 4 - Beta',
23
'Intended Audience :: Developers',
24
'License :: OSI Approved :: GNU General Public License v3 (GPL3)'
25
Index: lptools-0.2.0/bin/lp-attach
26
===================================================================
27
--- lptools-0.2.0.orig/bin/lp-attach
28
+++ lptools-0.2.0/bin/lp-attach
33
# Copyright (C) 2010 Canonical Ltd
35
@@ -35,7 +35,7 @@ from lptools import config
36
def guess_mime_type(attachment_bytes):
39
- except ImportError, e:
40
+ except ImportError as e:
41
sys.stderr.write("can't guess mime-types without the python-magic library: %s" % e)
44
@@ -43,13 +43,13 @@ def guess_mime_type(attachment_bytes):
45
mimetype = mime.buffer(attachment_bytes)
47
mimetype = 'application/binary'
48
- print 'attachment type %s' % mimetype
49
+ print('attachment type %s' % mimetype)
54
if len(argv) != 2 or argv[1] == '--help':
60
@@ -59,23 +59,23 @@ def main(argv):
63
lp = config.get_launchpad("attach")
64
- print "getting bug %s" % bugnumber
65
+ print("getting bug %s" % bugnumber)
66
bug = lp.bugs[bugnumber]
67
- print 'Attaching to %s' % bug
68
+ print('Attaching to %s' % bug)
70
attachment_bytes = sys.stdin.read()
71
- print '%d bytes to attach' % len(attachment_bytes)
72
+ print('%d bytes to attach' % len(attachment_bytes))
74
mime_type = guess_mime_type(attachment_bytes)
76
# mime type must be specified otherwise
77
# <https://bugs.edge.launchpad.net/malone/+bug/204560> assumes it's
78
# chemical/x-mopac-input
79
- print bug.addAttachment(comment='',
80
+ print(bug.addAttachment(comment='',
81
data=attachment_bytes,
83
filename='attachment',
84
- content_type=mime_type)
85
+ content_type=mime_type))
88
if __name__ == '__main__':
89
Index: lptools-0.2.0/bin/lp-bug-dupe-properties
90
===================================================================
91
--- lptools-0.2.0.orig/bin/lp-bug-dupe-properties
92
+++ lptools-0.2.0/bin/lp-bug-dupe-properties
97
# Copyright (C) 2012, Canonical Ltd.
98
# Written by Brian Murray
99
@@ -99,25 +99,25 @@ def main():
102
if bug.number_of_duplicates == 0:
103
- print('LP: #%s has no duplicates!' % bug_number)
104
+ print(('LP: #%s has no duplicates!' % bug_number))
107
for dupe in bug.duplicates:
109
prop = check_duplicate(dupe, search, key)
110
- if prop in dupe_props.keys():
111
+ if prop in list(dupe_props.keys()):
112
dupe_props[prop].append(str(dupe_num))
114
dupe_props[prop] = [str(dupe_num)]
116
dupe_count = bug.number_of_duplicates
118
- print('LP: #%s has %s duplicates' % (bug_number, dupe_count))
119
+ print(('LP: #%s has %s duplicates' % (bug_number, dupe_count)))
120
elif dupe_count == 1:
121
- print('LP: #%s has %s duplicate' % (bug_number, dupe_count))
122
+ print(('LP: #%s has %s duplicate' % (bug_number, dupe_count)))
124
for prop, bugs in sorted(dupe_props.items()):
125
- print(' %s: %s' % (prop, ' '.join(bugs)))
126
+ print((' %s: %s' % (prop, ' '.join(bugs))))
129
if __name__ == '__main__':
130
Index: lptools-0.2.0/bin/lp-capture-bug-counts
131
===================================================================
132
--- lptools-0.2.0.orig/bin/lp-capture-bug-counts
133
+++ lptools-0.2.0/bin/lp-capture-bug-counts
140
@@ -70,10 +70,10 @@ class CannedQuery(object):
142
# print self.get_name()
143
for category in self.query_categories():
144
- print '%6d %s %s' % (category.count_bugs(),
145
+ print('%6d %s %s' % (category.count_bugs(),
147
- category.get_link_url() or '')
149
+ category.get_link_url() or ''))
153
class PatchCannedQuery(CannedQuery):
154
@@ -103,7 +103,7 @@ class StatusCannedQuery(CannedQuery):
155
if bugtask.status not in by_status:
156
by_status[bugtask.status] = StatusBugCategory(bugtask.status)
157
by_status[bugtask.status].add(bugtask)
158
- return by_status.values()
159
+ return list(by_status.values())
162
def show_bug_report(project):
163
Index: lptools-0.2.0/bin/lp-check-membership
164
===================================================================
165
--- lptools-0.2.0.orig/bin/lp-check-membership
166
+++ lptools-0.2.0/bin/lp-check-membership
171
# Copyright (C) 2009 Canonical Ltd
173
@@ -38,7 +38,7 @@ def main(argv):
174
parser = optparse.OptionParser('%prog [options] PERSON GROUP')
175
opts, args = parser.parse_args()
182
@@ -46,10 +46,10 @@ def main(argv):
183
user = lp.people[user_name]
184
for user_team in user.super_teams:
185
if user_team.name == group_name:
186
- print '%s is a member of %s' % (user_name, group_name)
187
+ print('%s is a member of %s' % (user_name, group_name))
190
- print '%s is not a member of %s' % (user_name, group_name)
191
+ print('%s is not a member of %s' % (user_name, group_name))
195
Index: lptools-0.2.0/bin/lp-force-branch-mirror
196
===================================================================
197
--- lptools-0.2.0.orig/bin/lp-force-branch-mirror
198
+++ lptools-0.2.0/bin/lp-force-branch-mirror
202
# vi: expandtab:sts=4
204
# Copyright (C) 2011 Jelmer Vernooij
205
@@ -22,12 +22,12 @@ def main(argv):
207
lp = config.get_launchpad("force-branch-mirror")
208
branches = lp.branches.getByUrls(urls=args)
209
- for url, branch_dict in branches.iteritems():
210
+ for url, branch_dict in branches.items():
211
if branch_dict is None:
212
- print "Branch %s not found" % url
213
+ print("Branch %s not found" % url)
215
branch = lp.load(branch_dict["self_link"])
216
- print "%s: %s" % (branch.bzr_identity, branch.requestMirror())
217
+ print("%s: %s" % (branch.bzr_identity, branch.requestMirror()))
219
if __name__ == '__main__':
220
sys.exit(main(sys.argv))
221
Index: lptools-0.2.0/bin/lp-get-branches
222
===================================================================
223
--- lptools-0.2.0.orig/bin/lp-get-branches
224
+++ lptools-0.2.0/bin/lp-get-branches
228
# -*- coding: utf-8 -*-
230
# Copyright (C) 2007 Canonical Ltd.
231
@@ -79,13 +79,13 @@ def main():
233
team = launchpad.people[team]
235
- print >> sys.stderr, "E: The team '%s' doesn't exist." % team
236
+ print("E: The team '%s' doesn't exist." % team, file=sys.stderr)
238
# Get a list of branches
239
branches = team.getBranches()
241
- print "Downloading all branches for the '%s' team. This may take some " \
242
- "time." % team.display_name
243
+ print("Downloading all branches for the '%s' team. This may take some " \
244
+ "time." % team.display_name)
247
os.makedirs(team.name)
248
@@ -101,11 +101,11 @@ def main():
249
os.chdir(project_name)
251
if not os.path.exists(branch.name):
252
- print "Branching %s ..." % branch.display_name
253
+ print("Branching %s ..." % branch.display_name)
254
cmd = ["bzr", operation_type, branch.bzr_identity, branch.name]
257
- print "Merging %s ..." % branch.display_name
258
+ print("Merging %s ..." % branch.display_name)
259
os.chdir(branch.name)
260
subprocess.call(["bzr", "merge", "--pull", "--remember"])
261
os.chdir(os.path.join(directory, team.name))
262
@@ -117,4 +117,4 @@ if __name__ == "__main__":
265
except KeyboardInterrupt:
266
- print "Operation was interrupted by user."
267
+ print("Operation was interrupted by user.")
268
Index: lptools-0.2.0/bin/lp-grab-attachments
269
===================================================================
270
--- lptools-0.2.0.orig/bin/lp-grab-attachments
271
+++ lptools-0.2.0/bin/lp-grab-attachments
276
# Copyright (C) 2007, Canonical Ltd.
277
# Written by Daniel Holbach,
278
@@ -36,7 +36,7 @@ def download_attachments(bug, descriptio
281
os.mkdir(bug_folder_name)
282
- except OSError, error:
283
+ except OSError as error:
284
if error.errno == errno.EEXIST:
287
Index: lptools-0.2.0/bin/lp-list-bugs
288
===================================================================
289
--- lptools-0.2.0.orig/bin/lp-list-bugs
290
+++ lptools-0.2.0/bin/lp-list-bugs
294
# -*- coding: UTF-8 -*-
295
"""Briefly list status of Launchpad bugs."""
297
@@ -42,18 +42,17 @@ def main():
300
bug = launchpad.bugs[bugnum]
301
- print "Bug %s: %s" % (bugnum, bug.title)
302
+ print("Bug %s: %s" % (bugnum, bug.title))
303
for task in bug.bug_tasks:
304
- print " %s: %s" % (task.bug_target_name, task.status)
305
- except HTTPError, error:
306
+ print(" %s: %s" % (task.bug_target_name, task.status))
307
+ except HTTPError as error:
308
if error.response.status == 401:
309
- print >> sys.stderr, \
310
- ("E: Don't have enough permissions to access bug %s" %
312
- print >> sys.stderr, error.content
313
+ print(("E: Don't have enough permissions to access bug %s" %
314
+ bugnum), file=sys.stderr)
315
+ print(error.content, file=sys.stderr)
317
elif error.response.status == 404:
318
- print >> sys.stderr, "E: Bug %s not found" % bugnum
319
+ print("E: Bug %s not found" % bugnum, file=sys.stderr)
323
Index: lptools-0.2.0/bin/lp-milestone2ical
324
===================================================================
325
--- lptools-0.2.0.orig/bin/lp-milestone2ical
326
+++ lptools-0.2.0/bin/lp-milestone2ical
331
# Author: Rodney Dawes <rodney.dawes@canonical.com>
334
# You should have received a copy of the GNU General Public License along
335
# with this program. If not, see <http://www.gnu.org/licenses/>.
337
-from __future__ import with_statement
342
@@ -84,7 +84,7 @@ class MSMain(object):
344
self.__convert_to_ical(lp_project)
345
self.__end_calendar()
346
- print self.calendar()
347
+ print(self.calendar())
350
self.thread = Thread(target=self.__login_and_go).start()
351
@@ -99,7 +99,7 @@ if __name__ == "__main__":
353
project = sys.argv[1]
355
- print "Usage: %s <project>" % sys.argv[0]
356
+ print("Usage: %s <project>" % sys.argv[0])
360
Index: lptools-0.2.0/bin/lp-milestones
361
===================================================================
362
--- lptools-0.2.0.orig/bin/lp-milestones
363
+++ lptools-0.2.0/bin/lp-milestones
368
# Author: Robert Collins <robert.collins@canonical.com>
370
@@ -74,7 +74,7 @@ class cmd_delete(LaunchpadCommand):
371
m = self.launchpad.load('%s/+milestone/%s' % tuple(components))
374
- except HTTPError, e:
375
+ except HTTPError as e:
376
if e.response.status == 404:
378
elif e.response.status == 500:
379
Index: lptools-0.2.0/bin/lp-project
380
===================================================================
381
--- lptools-0.2.0.orig/bin/lp-project
382
+++ lptools-0.2.0/bin/lp-project
387
# Author: Robert Collins <robert.collins@canonical.com>
389
Index: lptools-0.2.0/bin/lp-project-upload
390
===================================================================
391
--- lptools-0.2.0.orig/bin/lp-project-upload
392
+++ lptools-0.2.0/bin/lp-project-upload
397
# Copyright (c) 2009 Canonical Ltd.
399
@@ -34,8 +34,8 @@ from lptools import config
400
def create_release(project, version):
401
'''Create new release and milestone for LP project.'''
403
- print 'Release %s could not be found for project. Create it? (Y/n)' % \
405
+ print('Release %s could not be found for project. Create it? (Y/n)' % \
407
answer = sys.stdin.readline().strip()
408
if answer.startswith('n'):
410
@@ -46,21 +46,21 @@ def create_release(project, version):
412
msg = 'More than one series exist. Which one would you like to ' \
413
'upload to? Possible series are (listed as index, name):'
416
for idx, serie in enumerate(project.series):
417
- print '\t%i - %s' % (idx, serie.name)
418
- print 'Enter series index: '
419
+ print('\t%i - %s' % (idx, serie.name))
420
+ print('Enter series index: ')
421
answer = sys.stdin.readline().strip()
423
series = project.series[int(answer)]
424
except (ValueError, IndexError):
425
- print >> sys.stderr, 'The series index is invalid (%s).' % answer
426
+ print('The series index is invalid (%s).' % answer, file=sys.stderr)
429
- print "Using series named '%s'" % series.name
430
+ print("Using series named '%s'" % series.name)
432
- print >> sys.stderr, ('Does not support creating releases if no '
434
+ print(('Does not support creating releases if no '
435
+ 'series exists.'), file=sys.stderr)
438
release_date = datetime.date.today().strftime('%Y-%m-%d')
439
@@ -86,9 +86,9 @@ def cat_file(f):
442
if len(sys.argv) < 4 or len(sys.argv) > 7:
443
- print >> sys.stderr, '''Upload a release tarball to a Launchpad project.
444
+ print('''Upload a release tarball to a Launchpad project.
446
- Usage: %s <project name> <version> <tarball> [new milestone] [changelog file] [releasenotes file]''' % sys.argv[0]
447
+ Usage: %s <project name> <version> <tarball> [new milestone] [changelog file] [releasenotes file]''' % sys.argv[0], file=sys.stderr)
451
@@ -127,10 +127,10 @@ def main():
452
# Get the signature, if available.
453
signature = tarball + '.asc'
454
if not os.path.exists(signature):
455
- print 'Calling GPG to create tarball signature...'
456
+ print('Calling GPG to create tarball signature...')
457
cmd = ['gpg', '--armor', '--sign', '--detach-sig', tarball]
458
if subprocess.call(cmd) != 0:
459
- print >> sys.stderr, 'gpg failed, aborting'
460
+ print('gpg failed, aborting', file=sys.stderr)
462
if os.path.exists(signature):
463
signature_content = open(signature, 'r').read()
464
@@ -167,8 +167,8 @@ def main():
465
if mil.name in [milestone.name for milestone in series.all_milestones]:
466
series.newMilestone(name=new_milestone)
468
- except HTTPError, error:
469
- print 'An error happened in the upload:', error.content
470
+ except HTTPError as error:
471
+ print('An error happened in the upload:', error.content)
474
if __name__ == '__main__':
475
Index: lptools-0.2.0/bin/lp-recipe-status
476
===================================================================
477
--- lptools-0.2.0.orig/bin/lp-recipe-status
478
+++ lptools-0.2.0/bin/lp-recipe-status
482
# vi: expandtab:sts=4
484
# Copyright (C) 2011 Jelmer Vernooij <jelmer@samba.org>
486
"""Show the status of the recipes owned by a particular user.
489
-from cStringIO import StringIO
490
+from io import StringIO
497
+import urllib.request, urllib.parse, urllib.error
499
from lptools import config
501
@@ -70,7 +70,7 @@ def source_build_find_version(source_bui
503
return tuple(cached_version.split(" "))
504
# FIXME: Find a more efficient way to retrieve the package/version that was built
505
- build_log_gz = urllib.urlopen(source_build.build_log_url)
506
+ build_log_gz = urllib.request.urlopen(source_build.build_log_url)
507
build_log = gzip.GzipFile(fileobj=StringIO(build_log_gz.read()))
510
@@ -172,10 +172,10 @@ def recipe_status_html(launchpad, person
511
last_per_distroseries = gather_per_distroseries_source_builds(recipe)
512
source_builds[recipe.name] = last_per_distroseries
513
relevant_distroseries.update(set(last_per_distroseries))
514
- (sp_success, sp_failures) = filter_source_builds(last_per_distroseries.values())
515
+ (sp_success, sp_failures) = filter_source_builds(list(last_per_distroseries.values()))
516
binary_builds[recipe.name] = find_binary_builds(recipe, sp_success)
517
all_binary_builds_ok[recipe.name] = {}
518
- for distroseries, recipe_binary_builds in binary_builds[recipe.name].iteritems():
519
+ for distroseries, recipe_binary_builds in binary_builds[recipe.name].items():
520
all_binary_builds_ok[recipe.name][distroseries] = all(
521
[bb.buildstate == "Successfully built" for bb in recipe_binary_builds])
522
relevant_distroseries = list(relevant_distroseries)
523
@@ -201,7 +201,7 @@ def recipe_status_text(recipes, outf):
524
for recipe in recipes:
525
last_per_distroseries = gather_per_distroseries_source_builds(recipe)
526
(sp_success, sp_failures) = filter_source_builds(
527
- last_per_distroseries.values())
528
+ list(last_per_distroseries.values()))
529
sp_success_distroseries = [build.distro_series.name for build in sp_success]
531
outf.write("%s source build failures (%s successful):\n" % (
532
Index: lptools-0.2.0/bin/lp-remove-team-members
533
===================================================================
534
--- lptools-0.2.0.orig/bin/lp-remove-team-members
535
+++ lptools-0.2.0/bin/lp-remove-team-members
540
# Copyright 2011 Canonical Ltd.
542
@@ -28,21 +28,21 @@ from lptools.config import (
549
lp = get_launchpad('lptools on %s' % (socket.gethostname(),))
551
team = lp.people[team_name]
552
members_details = team.members_details
553
for exile_name in args[2:]:
554
- print 'remove %s from %s...' % (exile_name, team_name),
555
+ print('remove %s from %s...' % (exile_name, team_name), end=' ')
556
for m in members_details:
557
if m.member.name == exile_name:
558
m.setStatus(status='Deactivated')
563
- print 'not a member?'
564
+ print('not a member?')
567
if __name__ == '__main__':
568
Index: lptools-0.2.0/bin/lp-review-list
569
===================================================================
570
--- lptools-0.2.0.orig/bin/lp-review-list
571
+++ lptools-0.2.0/bin/lp-review-list
576
# Author: Rodney Dawes <rodney.dawes@canonical.com>
579
# You should have received a copy of the GNU General Public License along
580
# with this program. If not, see <http://www.gnu.org/licenses/>.
582
-from __future__ import with_statement
586
from threading import Thread
587
@@ -87,7 +87,7 @@ class Window(gtk.Window):
589
self.me = self.launchpad.me
591
- print "Allo, %s" % self.me.name
592
+ print("Allo, %s" % self.me.name)
593
gtk.gdk.threads_enter()
595
gtk.gdk.threads_leave()
596
@@ -114,18 +114,18 @@ class Window(gtk.Window):
598
def __load_merges(self):
600
- mine = self.me.getRequestedReviews(status=[u'Needs review'])
601
+ mine = self.me.getRequestedReviews(status=['Needs review'])
605
for team in self.me.super_teams:
606
- for merge in team.getRequestedReviews(status=[u'Needs review']):
607
+ for merge in team.getRequestedReviews(status=['Needs review']):
608
if merge not in merges:
613
- for key in VOTES.keys():
614
+ for key in list(VOTES.keys()):
617
for vote in merge.votes:
618
@@ -134,14 +134,14 @@ class Window(gtk.Window):
620
votes[vote.comment.vote] += 1
622
- for key in votes.keys():
623
+ for key in list(votes.keys()):
628
["<span color='%s'>%s</span>: %d" \
629
% (VOTES[key], key, votes[key]) \
630
- for key in votes.keys()]
631
+ for key in list(votes.keys())]
635
Index: lptools-0.2.0/bin/lp-review-notifier
636
===================================================================
637
--- lptools-0.2.0.orig/bin/lp-review-notifier
638
+++ lptools-0.2.0/bin/lp-review-notifier
643
# Author: Rodney Dawes <rodney.dawes@canonical.com>
646
# You should have received a copy of the GNU General Public License along
647
# with this program. If not, see <http://www.gnu.org/licenses/>.
649
-from __future__ import with_statement
654
@@ -25,7 +25,7 @@ import gtk
658
-from ConfigParser import ConfigParser
659
+from configparser import ConfigParser
662
from xdg.BaseDirectory import (
663
@@ -182,7 +182,7 @@ class Main(object):
664
self.config = Preferences()
666
if len(self.config.projects) == 0:
667
- print "No Projects specified"
668
+ print("No Projects specified")
671
for project in self.config.projects:
672
@@ -209,14 +209,14 @@ class Main(object):
673
lp_project = self.launchpad.projects[project]
674
focus = lp_project.development_focus.branch
675
except AttributeError:
676
- print "Project %s has no development focus." % project
677
+ print("Project %s has no development focus." % project)
680
- print "Project %s not found." % project
681
+ print("Project %s not found." % project)
685
- print "Project %s has no development focus." % project
686
+ print("Project %s has no development focus." % project)
690
@@ -280,7 +280,7 @@ class Main(object):
694
- print "%s status is %s." % (source, c.queue_status)
695
+ print("%s status is %s." % (source, c.queue_status))
698
n.set_urgency(pynotify.URGENCY_LOW)
699
Index: lptools-0.2.0/bin/lp-set-dup
700
===================================================================
701
--- lptools-0.2.0.orig/bin/lp-set-dup
702
+++ lptools-0.2.0/bin/lp-set-dup
706
# -*- coding: UTF-8 -*-
707
"""Sets the "duplicate of" bug of a bug and its dups."""
709
@@ -30,7 +30,7 @@ from launchpadlib.errors import HTTPErro
710
from lptools import config
713
- print >> sys.stderr, "Fatal: " + message
714
+ print("Fatal: " + message, file=sys.stderr)
718
@@ -57,10 +57,10 @@ def main():
719
# check that the new main bug isn't a duplicate
721
new_main_bug = launchpad.bugs[args[0]]
722
- except HTTPError, error:
723
+ except HTTPError as error:
724
if error.response.status == 401:
725
- print >> sys.stderr, ("E: Don't have enough permissions to access "
726
- "bug %s") % (args[0])
727
+ print(("E: Don't have enough permissions to access "
728
+ "bug %s") % (args[0]), file=sys.stderr)
732
@@ -68,7 +68,7 @@ def main():
733
if new_main_dup_of is not None:
736
- answer = raw_input("Bug %s is a duplicate of %s; would you like to "
737
+ answer = input("Bug %s is a duplicate of %s; would you like to "
738
"use %s as the new main bug instead? [y/N]" % \
739
(new_main_bug.id, new_main_dup_of.id,
741
@@ -81,38 +81,38 @@ def main():
742
# build list of bugs to process, first the dups then the bug
744
for bug_number in args[1:]:
745
- print "Processing %s" % (bug_number)
746
+ print("Processing %s" % (bug_number))
748
bug = launchpad.bugs[bug_number]
749
- except HTTPError, error:
750
+ except HTTPError as error:
751
if error.response.status == 401:
752
- print >> sys.stderr, ("W: Don't have enough permissions to "
753
- "access bug %s") % (bug_number)
754
- print >> sys.stderr, "W: %s" % (error.content)
755
+ print(("W: Don't have enough permissions to "
756
+ "access bug %s") % (bug_number), file=sys.stderr)
757
+ print("W: %s" % (error.content), file=sys.stderr)
761
dups = bug.duplicates
763
bugs_to_process.extend(dups)
764
- print "Found %i dups for %s" % (len(dups), bug_number)
765
+ print("Found %i dups for %s" % (len(dups), bug_number))
766
bugs_to_process.append(bug)
768
# process dups first, then their main bug
769
- print "Would set the following bugs as duplicates of %s: %s" % \
770
- (new_main_bug.id, " ".join([str(b.id) for b in bugs_to_process]))
771
+ print("Would set the following bugs as duplicates of %s: %s" % \
772
+ (new_main_bug.id, " ".join([str(b.id) for b in bugs_to_process])))
774
if not options.force:
777
- answer = raw_input("Proceed? [y/N]")
778
+ answer = input("Proceed? [y/N]")
781
if answer.lower() not in ("y", "yes"):
784
for bug in bugs_to_process:
785
- print "Marking bug %s as a duplicate of %s" % (bug.id, new_main_bug.id)
786
+ print("Marking bug %s as a duplicate of %s" % (bug.id, new_main_bug.id))
787
bug.duplicate_of = new_main_bug
790
Index: lptools-0.2.0/bin/lp-shell
791
===================================================================
792
--- lptools-0.2.0.orig/bin/lp-shell
793
+++ lptools-0.2.0/bin/lp-shell
798
# Open an interactive launchpadlib Python shell.
799
# It supports all known LP service instances and API versions. The login
800
@@ -52,16 +52,16 @@ def main():
803
instance = lookup_service_root(args[0])
804
- except ValueError, err:
805
- print 'E: %s' % (err)
806
- print 'I: Falling back to "production".'
807
+ except ValueError as err:
808
+ print('E: %s' % (err))
809
+ print('I: Falling back to "production".')
812
if args[1] in valid_api_versions:
813
api_version = args[1]
815
- print 'E: "%s" is not a valid LP API version.' % (args[1])
816
- print 'I: Falling back to "1.0".'
817
+ print('E: "%s" is not a valid LP API version.' % (args[1]))
818
+ print('I: Falling back to "1.0".')
820
if options.anonymous:
821
launchpad = Launchpad.login_anonymously('lp-shell', instance,
822
@@ -94,7 +94,7 @@ def main():
823
sh.set_banner(sh.IP.BANNER + '\n' + banner)
824
sh.excepthook = sys.__excepthook__
826
- print "E: ipython not available. Using normal python shell."
827
+ print("E: ipython not available. Using normal python shell.")
831
@@ -106,7 +106,7 @@ def main():
835
- print 'I: readline module not available.'
836
+ print('I: readline module not available.')
839
readline.parse_and_bind("tab: complete")