X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fflad%2Fflad.py;h=b2446d824bfa8cdeac042995405c0e4ca6f4a159;hb=fea5b1d068bc94adce899a804a643bf24b8a9777;hp=830fdfd07beae6c9b38cdafa8f2be20bcb453cca;hpb=8d79317cdc8220ff3c2192e68fc1dfc749c3ea1c;p=m_lib.git diff --git a/m_lib/flad/flad.py b/m_lib/flad/flad.py index 830fdfd..b2446d8 100644 --- a/m_lib/flad/flad.py +++ b/m_lib/flad/flad.py @@ -40,7 +40,7 @@ class Flad(UserList): if callable(self.check_record_func): return self.check_record_func(self, record) else: - raise TypeError, "non-callable restriction function" + raise TypeError("non-callable restriction function") else: return 1 @@ -88,7 +88,7 @@ class Flad(UserList): if line[-1] == '\n': line = line[:-1] # Chop - l = string.split(line, self.key_sep, 1) # Just split to key and reminder + l = line.split(self.key_sep, 1) # Just split to key and reminder return tuple(l) @@ -105,7 +105,7 @@ class Flad(UserList): # so it is not ready to be checked :( # And, of course, two keys with the same name # cannot be added to dictionary - raise KeyError, "field key \"" + key + "\" already in record" + raise KeyError("field key \"" + key + "\" already in record") record[key] = value @@ -216,7 +216,7 @@ class Flad(UserList): flush_record = 0 # Do not close record on 1st loop - if self.comment <> '': + if self.comment != '': outfile.write(self.comment) for record in self: