Bug#788864: python-debian: License field in files paragraph should be required not optional

Stuart Prescott stuart at debian.org
Sun Mar 18 07:31:17 UTC 2018


Hi Orestis,

Thanks for your feedback

> > * It introduces a `MachineReadableFormatError` which is used for format
> > errors; I think it's worth distinguishing between an error in the format
> > and the copyright file not being in the format at all
> > (`NotMachineReadableError`). `MachineReadableFormatError` is derived from
> > `ValueError` which I think makes sense.
> 
> I think the module should raise errors inherited by Error
> https://salsa.debian.org/python-debian-team/python-debian/blob/8ed0ff84e7f41
> d0ba08ac11dcc0d7c66597f37b1/lib/debian/copyright.py#L46 otherwise there is
> not much use to it. Hence i suggest that
> MachineReadableFormatError inherits from that as well.

I think I have now addressed that and we now have:

	class MachineReadableFormatError(Error, ValueError):

so that all errors that the class may raise are derived from copyright.Error 
as you suggest but backwards compatibility and the semantics of the ValueError 
are also preserved.

Does that look right?

https://salsa.debian.org/python-debian-team/python-debian/merge_requests/1

Any other comments? (from you or anyone else?!)

cheers
Stuart

-- 
Stuart Prescott    http://www.nanonanonano.net/   stuart at nanonanonano.net
Debian Developer   http://www.debian.org/         stuart at debian.org
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7



More information about the pkg-python-debian-maint mailing list