[linux] 01/05: debian/patches/features/all/rt/genpatch.py: Use Python 3
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sun Jun 5 18:23:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository linux.
commit 0724abc4326ea3a5944f0c382406ae3fecb005ed
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sun Jun 5 17:41:39 2016 +0100
debian/patches/features/all/rt/genpatch.py: Use Python 3
---
debian/changelog | 1 +
debian/patches/features/all/rt/genpatch.py | 14 +++++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d563ffc..9742eec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ linux (4.6.1-1~exp1) UNRELEASED; urgency=medium
* linux-image: Make a newly installed kernel the default if the package
was previously removed
* mtd: Disable slram and phram when securelevel is enabled
+ * debian/patches/features/all/rt/genpatch.py: Use Python 3
-- Ben Hutchings <ben at decadent.org.uk> Sat, 04 Jun 2016 18:33:11 +0100
diff --git a/debian/patches/features/all/rt/genpatch.py b/debian/patches/features/all/rt/genpatch.py
index 776a3ae..464e241 100755
--- a/debian/patches/features/all/rt/genpatch.py
+++ b/debian/patches/features/all/rt/genpatch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import errno, os, os.path, re, shutil, subprocess, sys
@@ -15,7 +15,7 @@ def main(source_dir, version):
name = line.strip()
if name != '' and name[0] != '#':
old_series.add(name)
- except IOError, e:
+ except IOError as e:
if e.errno != errno.ENOENT:
raise
@@ -27,7 +27,7 @@ def main(source_dir, version):
path = os.path.join(patch_dir, name)
try:
os.unlink(path)
- except OSError, e:
+ except OSError as e:
if e.errno != errno.ENOENT:
raise
with open(path, 'w') as patch:
@@ -81,14 +81,14 @@ def main(source_dir, version):
if name in old_series:
old_series.remove(name)
else:
- print 'Added patch', os.path.join(patch_dir, name)
+ print('Added patch', os.path.join(patch_dir, name))
for name in old_series:
- print 'Obsoleted patch', os.path.join(patch_dir, name)
+ print('Obsoleted patch', os.path.join(patch_dir, name))
if __name__ == '__main__':
if len(sys.argv) != 3:
- print >>sys.stderr, 'Usage: %s DIR RT-VERSION' % sys.argv[0]
- print >>sys.stderr, 'DIR is either a git repo or quilt directory containing the given RT-VERSION.'
+ print('Usage: %s DIR RT-VERSION' % sys.argv[0], file=sys.stderr)
+ print('DIR is either a git repo or quilt directory containing the given RT-VERSION.', file=sys.stderr)
sys.exit(2)
main(sys.argv[1], sys.argv[2])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list