debian_linux.utils: Support templates for RFC822 files other than debian/control

This commit is contained in:
Ben Hutchings 2015-08-11 23:25:51 +02:00
parent 0b7b6d7a62
commit 9c8d371306
1 changed files with 3 additions and 1 deletions

View File

@ -40,12 +40,14 @@ class Templates(object):
def read_control(f):
from .debian import Package
return _read_rfc822(f, Package)
def _read_rfc822(f, cls):
entries = []
eof = False
while not eof:
e = Package()
e = cls()
last = None
lines = []
while True: