]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/flad/flad.py
Fix exceptions for Py3 compatibility
[m_lib.git] / m_lib / flad / flad.py
index 232852f78dd20b63eb48491465360d738c4cf7f2..8ca1093607a4b3d1f7b5fa5ca77ed07d5d93b637 100644 (file)
@@ -5,7 +5,8 @@
 
 
 # Flad restriction error
-checking_error = "flad.checking_error"
+class checking_error(Exception):
+    pass
 
 # Default key/value separator
 def_keysep = ": "
@@ -224,7 +225,7 @@ class Flad(list):
             flush_record = 1    # Set flag for all but 1st record
 
          if copy_rec:
-            for key in copy_rec.keys():
+            for key in list(copy_rec.keys()):
                outfile.write(key + self.key_sep + copy_rec[key] + '\n')
                del copy_rec[key]