daklib.formats¶
Helper functions for the various changes formats
@contact: Debian FTPMaster <ftpmaster@debian.org> @copyright: 2009, 2010 Joerg Jaspert <joerg@debian.org> @copyright: 2009 Chris Lamb <lamby@debian.org> @license: GNU General Public License version 2 or later
Functions
  | 
Parse a .changes Format string into a tuple representation for easy comparison.  | 
  | 
Validate a tuple-representation of a .changes Format: field.  | 
- daklib.formats.parse_format(txt: str) tuple[source]¶
 Parse a .changes Format string into a tuple representation for easy comparison.
>>> parse_format('1.0') (1, 0) >>> parse_format('8.4 (hardy)') (8, 4, 'hardy')
If the format doesn’t match these forms, raises UnknownFormatError.
- Parameters:
 txt – Format string to parse
- Returns:
 Parsed format
- Raises:
 UnknownFormatError – Unknown Format: line