-# Parses a changes file and returns a dictionary where each field is a
-# key. The mandatory first argument is the filename of the .changes
-# file.
-
-# dsc_whitespace_rules is an optional boolean argument which defaults
-# to off. If true, it turns on strict format checking to avoid
-# allowing in source packages which are unextracable by the
-# inappropriately fragile dpkg-source.
-#
-# The rules are:
-#
-# o The PGP header consists of "-----BEGIN PGP SIGNED MESSAGE-----"
-# followed by any PGP header data and must end with a blank line.
-#
-# o The data section must end with a blank line and must be followed by
-# "-----BEGIN PGP SIGNATURE-----".
-
-def parse_changes(filename, dsc_whitespace_rules=0):
+def parse_changes(filename, signing_rules=0):
+ """Parses a changes file and returns a dictionary where each field is a
+key. The mandatory first argument is the filename of the .changes
+file.
+
+signing_rules is an optional argument:
+
+ o If signing_rules == -1, no signature is required.
+ o If signing_rules == 0 (the default), a signature is required.
+ o If signing_rules == 1, it turns on the same strict format checking
+ as dpkg-source.
+
+The rules for (signing_rules == 1)-mode are:
+
+ o The PGP header consists of "-----BEGIN PGP SIGNED MESSAGE-----"
+ followed by any PGP header data and must end with a blank line.
+
+ o The data section must end with a blank line and must be followed by
+ "-----BEGIN PGP SIGNATURE-----".
+"""
+