mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-12 09:21:29 +00:00
Port pbuilder-dist to Python 3
This commit is contained in:
parent
118f95b62e
commit
d1949a72aa
1
debian/control
vendored
1
debian/control
vendored
@ -64,6 +64,7 @@ Depends:
|
|||||||
python-ubuntutools,
|
python-ubuntutools,
|
||||||
python3,
|
python3,
|
||||||
python3-apt,
|
python3-apt,
|
||||||
|
python3-debian,
|
||||||
python3-distro-info,
|
python3-distro-info,
|
||||||
python3-httplib2,
|
python3-httplib2,
|
||||||
python3-launchpadlib,
|
python3-launchpadlib,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/env python
|
#! /usr/bin/python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007-2010, Siegfried-A. Gevatter <rainct@ubuntu.com>,
|
# Copyright (C) 2007-2010, Siegfried-A. Gevatter <rainct@ubuntu.com>,
|
||||||
@ -279,7 +279,7 @@ class PbuilderDist(object):
|
|||||||
try:
|
try:
|
||||||
codename = debian_info.codename(self.target_distro,
|
codename = debian_info.codename(self.target_distro,
|
||||||
default=self.target_distro)
|
default=self.target_distro)
|
||||||
except DistroDataOutdated, error:
|
except DistroDataOutdated as error:
|
||||||
Logger.warn(error)
|
Logger.warn(error)
|
||||||
if codename in (debian_info.devel(), 'experimental'):
|
if codename in (debian_info.devel(), 'experimental'):
|
||||||
self.enable_security = False
|
self.enable_security = False
|
||||||
@ -306,7 +306,7 @@ class PbuilderDist(object):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
dev_release = self.target_distro == UbuntuDistroInfo().devel()
|
dev_release = self.target_distro == UbuntuDistroInfo().devel()
|
||||||
except DistroDataOutdated, error:
|
except DistroDataOutdated as error:
|
||||||
Logger.warn(error)
|
Logger.warn(error)
|
||||||
dev_release = True
|
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 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)
|
sys.exit(exit_code)
|
||||||
|
|
||||||
@ -498,7 +498,7 @@ def main():
|
|||||||
if '--debug-echo' not in args:
|
if '--debug-echo' not in args:
|
||||||
sys.exit(subprocess.call(app.get_command(args)))
|
sys.exit(subprocess.call(app.get_command(args)))
|
||||||
else:
|
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__':
|
if __name__ == '__main__':
|
||||||
|
2
setup.py
2
setup.py
@ -26,6 +26,7 @@ if sys.version_info[0] >= 3:
|
|||||||
'grep-merges',
|
'grep-merges',
|
||||||
'hugdaylist',
|
'hugdaylist',
|
||||||
'mk-sbuild',
|
'mk-sbuild',
|
||||||
|
'pbuilder-dist',
|
||||||
'pbuilder-dist-simple',
|
'pbuilder-dist-simple',
|
||||||
'pull-debian-source',
|
'pull-debian-source',
|
||||||
'pull-revu-source',
|
'pull-revu-source',
|
||||||
@ -42,7 +43,6 @@ else:
|
|||||||
scripts = [
|
scripts = [
|
||||||
'import-bug-from-debian',
|
'import-bug-from-debian',
|
||||||
'merge-changelog',
|
'merge-changelog',
|
||||||
'pbuilder-dist',
|
|
||||||
'pull-debian-debdiff',
|
'pull-debian-debdiff',
|
||||||
'pull-lp-source',
|
'pull-lp-source',
|
||||||
'pull-uca-source',
|
'pull-uca-source',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user