Source: python-debian Version: 0.1.28 Tags: patch Severity: wishlist Hi,
The attached patch replaces: TypeError: bytes or unicode/string required with: TypeError: bytes or unicode/string required, not <class 'int'> .. which is a little more useful for developers - they are almost certainly going to do the same thing manually when debugging. :) Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/lib/debian/deb822.py b/lib/debian/deb822.py index c1dcb17..403fd95 100644 --- a/lib/debian/deb822.py +++ b/lib/debian/deb822.py @@ -1269,7 +1269,7 @@ class _gpg_multivalued(_multivalued): return s if isinstance(s, six.string_types): return s.encode(encoding) - raise TypeError('bytes or unicode/string required') + raise TypeError('bytes or unicode/string required, not %s' % type(s)) class Dsc(_gpg_multivalued):