dhlab-basel / alephmarcreader

Python Library to read Marc obtained from Aleph
GNU Affero General Public License v3.0
1 stars 0 forks source link

Loging unexpected cardinality: no field information in subfield handling #22

Closed BalduinLandolt closed 5 years ago

BalduinLandolt commented 5 years ago

When an unexpected cardinality occurs (see Issue #15 ), this should best be logged right away. (As I attemt in pullrequest #21 .) The problem here is that it's hard to print a reasonable warning message within _handle_subfields_cardinality_max_one(), because there we only have an array of Subfields (which we expect to be max. 1 long), but no information on what field we're in or what the subfield identifier is.

I see two options:

@tobiasschweizer What say you? Wich option would you prefer?