From: Chris Lamb Date: Wed, 28 Oct 2009 13:34:59 +0000 (+0000) Subject: Make build_file_list to use get_format_from_string and friends. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=b5c3ede35457e214100e075f95b5118bbc8317a8;p=dak.git Make build_file_list to use get_format_from_string and friends. Signed-off-by: Chris Lamb --- diff --git a/daklib/utils.py b/daklib/utils.py index 8362c57f..030c1ae6 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -47,7 +47,7 @@ from regexes import re_html_escaping, html_escaping, re_single_line_field, \ re_multi_line_field, re_srchasver, re_taint_free, \ re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource -from srcformats import srcformats +from srcformats import srcformats, get_format_from_string from collections import defaultdict ################################################################################ @@ -523,8 +523,9 @@ def build_file_list(changes, is_a_dsc=0, field="files", hashname="md5sum"): if not changes.has_key(field): raise NoFilesFieldError - format = SourceFormat.parse_format(changes.get["format"]) - SourceFormat.validate_format(format, is_a_dsc=False, field='files') + # Get SourceFormat object for this Format and validate it + format = get_format_from_string(changes.get['format']) + format.validate_format(is_a_dsc=is_a_dsc, field=field) includes_section = (not is_a_dsc) and field == "files"