X-Git-Url: https://git.phdru.name/?p=m_lib.git;a=blobdiff_plain;f=m_lib%2Fflad%2Ffladm.py;h=3705a304e9cb20a3cd0626313c1597edb9859d6e;hp=c0e2886061121e064af58eea1d9fa47d7a001f90;hb=e75d2c94f9bd326ebaace635a06599a1be35b024;hpb=87ed070d1b1776366d3ddd15eef1f37a45c585ea diff --git a/m_lib/flad/fladm.py b/m_lib/flad/fladm.py index c0e2886..3705a30 100644 --- a/m_lib/flad/fladm.py +++ b/m_lib/flad/fladm.py @@ -71,11 +71,11 @@ def check_record(data, record): if must_keys and (key in must_keys): del copy_must[copy_must.index(key)] # Remove the key from copied list elif (must_keys and (key not in must_keys) and (other_keys and (key not in other_keys))) or (other_keys and (key not in other_keys)): - raise KeyError, "field key \"" + key + "\" is not in list of allowed keys" + raise KeyError("field key \"" + key + "\" is not in list of allowed keys") if copy_must: # If there is at least one key - it is an error: # not all "must" keys are in record - raise KeyError, "not all \"must\" keys are in record; keys: " + str(copy_must) + raise KeyError("not all \"must\" keys are in record; keys: " + str(copy_must)) return 1