Port pull-debian-debdiff to Python 3

This commit is contained in:
Stefano Rivera 2019-09-04 15:34:27 -03:00
parent d1949a72aa
commit 6a60ee963d
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# pull-debian-debdiff - find and download a specific version of a Debian
# package and its immediate parent to generate a debdiff.
#
@ -84,7 +84,7 @@ def main():
newpkg = DebianSourcePackage(package, version, mirrors=mirrors)
try:
newpkg.pull()
except DownloadError, e:
except DownloadError as e:
Logger.error('Failed to download: %s', str(e))
sys.exit(1)
newpkg.unpack()
@ -101,10 +101,10 @@ def main():
oldpkg = DebianSourcePackage(package, oldversion, mirrors=mirrors)
try:
oldpkg.pull()
except DownloadError, e:
except DownloadError as e:
Logger.error('Failed to download: %s', str(e))
sys.exit(1)
print 'file://' + oldpkg.debdiff(newpkg, diffstat=True)
print('file://' + oldpkg.debdiff(newpkg, diffstat=True))
if __name__ == '__main__':

View File

@ -28,6 +28,7 @@ if sys.version_info[0] >= 3:
'mk-sbuild',
'pbuilder-dist',
'pbuilder-dist-simple',
'pull-debian-debdiff',
'pull-debian-source',
'pull-revu-source',
'reverse-build-depends',
@ -43,7 +44,6 @@ else:
scripts = [
'import-bug-from-debian',
'merge-changelog',
'pull-debian-debdiff',
'pull-lp-source',
'pull-uca-source',
'requestbackport',