X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=67ecc11a6147b31a31acc8057046fe7a2b82fc8f;hb=0c651a23e6e80c3ea290a76d8114d73d8b26ef37;hp=e709788ed39affc9715d518893fba1eb5dabc5df;hpb=a51c070b5347ed9244c7b1db48bc4adb4801d24e;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index e709788e..67ecc11a 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -48,6 +48,7 @@ from regexes import re_html_escaping, html_escaping, re_single_line_field, \ re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource, \ re_is_orig_source +from formats import parse_format, validate_changes_format from srcformats import get_format_from_string from collections import defaultdict @@ -527,9 +528,9 @@ def build_file_list(changes, is_a_dsc=0, field="files", hashname="md5sum"): if not changes.has_key(field): raise NoFilesFieldError - # 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) + # Validate .changes Format: field + if not is_a_dsc: + validate_changes_format(parse_format(changes['format']), field) includes_section = (not is_a_dsc) and field == "files" @@ -1552,4 +1553,4 @@ def ensure_orig_files(changes, dest_dir, session): os.symlink(src, dest) symlinked.append(dest) - return files + return (exists, symlinked)