Port pbuilder-dist to Python 3

This commit is contained in:
Stefano Rivera 2019-09-04 15:29:12 -03:00
parent 118f95b62e
commit d1949a72aa
3 changed files with 7 additions and 6 deletions

1
debian/control vendored
View File

@ -64,6 +64,7 @@ Depends:
python-ubuntutools,
python3,
python3-apt,
python3-debian,
python3-distro-info,
python3-httplib2,
python3-launchpadlib,

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2010, Siegfried-A. Gevatter <rainct@ubuntu.com>,
@ -279,7 +279,7 @@ class PbuilderDist(object):
try:
codename = debian_info.codename(self.target_distro,
default=self.target_distro)
except DistroDataOutdated, error:
except DistroDataOutdated as error:
Logger.warn(error)
if codename in (debian_info.devel(), 'experimental'):
self.enable_security = False
@ -306,7 +306,7 @@ class PbuilderDist(object):
else:
try:
dev_release = self.target_distro == UbuntuDistroInfo().devel()
except DistroDataOutdated, error:
except DistroDataOutdated as error:
Logger.warn(error)
dev_release = True
@ -396,7 +396,7 @@ def show_help(exit_code=0):
Print a help message for pbuilder-dist, and exit with the given code.
"""
print 'See man pbuilder-dist for more information.'
print('See man pbuilder-dist for more information.')
sys.exit(exit_code)
@ -498,7 +498,7 @@ def main():
if '--debug-echo' not in args:
sys.exit(subprocess.call(app.get_command(args)))
else:
print app.get_command([arg for arg in args if arg != '--debug-echo'])
print(app.get_command([arg for arg in args if arg != '--debug-echo']))
if __name__ == '__main__':

View File

@ -26,6 +26,7 @@ if sys.version_info[0] >= 3:
'grep-merges',
'hugdaylist',
'mk-sbuild',
'pbuilder-dist',
'pbuilder-dist-simple',
'pull-debian-source',
'pull-revu-source',
@ -42,7 +43,6 @@ else:
scripts = [
'import-bug-from-debian',
'merge-changelog',
'pbuilder-dist',
'pull-debian-debdiff',
'pull-lp-source',
'pull-uca-source',