]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
Don't validate a .changes Format as a source package version format (!)
[dak.git] / daklib / utils.py
index 3305f695ac4faab639dad148b95f8493b83da8b7..b0b71c0169d413e32d5a6c0b1aa009dd76f4211d 100755 (executable)
@@ -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,8 @@ 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['format'])
-    format.validate_format(is_a_dsc=is_a_dsc, field=field)
+    # Validate .changes Format: field
+    validate_changes_format(parse_format(changes['format']), field)
 
     includes_section = (not is_a_dsc) and field == "files"