From 8b0aacdc260f03762e2c20389b302466d8910fc2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 1 Oct 2018 21:56:28 +0100 Subject: [PATCH] debian/lib/python/debian_linux/gencontrol.py: Delete broken methods MakeFlags.__repr__ references a "flags" type (probably meant to be MakeFlags). Gencontrol.write_config references the "file" type which was removed in Python 3. Clearly neither of these methods are actually used, so delete them. --- debian/changelog | 1 + debian/lib/python/debian_linux/gencontrol.py | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 362c6d729..1581798bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ linux (4.19~rc6-1~exp1) UNRELEASED; urgency=medium instead of editing path * debian/bin, debian/lib/python: Clean up imports based on pyflakes report * debian/bin, debian/lib/python: Delete write-only vars reported by pyflakes + * debian/lib/python/debian_linux/gencontrol.py: Delete broken methods -- Ben Hutchings Thu, 20 Sep 2018 02:40:54 +0100 diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py index 6b464e580..1a322024a 100644 --- a/debian/lib/python/debian_linux/gencontrol.py +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -65,10 +65,6 @@ class Makefile(object): class MakeFlags(dict): - def __repr__(self): - repr = super(flags, self).__repr__() - return "%s(%s)" % (self.__class__.__name__, repr) - def __str__(self): return ' '.join("%s='%s'" % i for i in sorted(self.items())) @@ -372,11 +368,6 @@ class Gencontrol(object): self.write_control(packages.values()) self.write_makefile(makefile) - def write_config(self): - f = file("debian/config.dump", 'w') - self.config.write(f) - f.close() - def write_control(self, list, name='debian/control'): self.write_rfc822(codecs.open(name, 'w', 'utf-8'), list)