]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/flad/fladm.py
Fix dict keys for Py3 compatibility
[m_lib.git] / m_lib / flad / fladm.py
index 3705a304e9cb20a3cd0626313c1597edb9859d6e..6143122e057a3d5a6113324c1962bfec46e70e4b 100644 (file)
@@ -3,7 +3,7 @@
 """
 
 
-from flad import Flad, def_keysep
+from m_lib.flad.flad import Flad, def_keysep
 
 
 class Flad_WithMustKeys(Flad):
@@ -42,12 +42,12 @@ class Flad_WithMustKeys(Flad):
 
          if self.other_keys:
             for key in self.other_keys:
-               if copy_rec.has_key(key):
+               if key in copy_rec:
                   outfile.write(key + def_keysep + copy_rec[key] + '\n')
                   del copy_rec[key]
 
          if copy_rec:
-            for key in copy_rec.keys():
+            for key in list(copy_rec.keys()):
                outfile.write(key + def_keysep + copy_rec[key] + '\n')
                del copy_rec[key]