[dak/master 09/10] Make build_file_list to use get_format_from_string and friends.
Signed-off-by: Chris Lamb <lamby@debian.org>
---
daklib/utils.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/daklib/utils.py b/daklib/utils.py
index 8362c57..030c1ae 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"
--
1.6.3.3
Reply to: