]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/flad/fladc.py
Raise Error(message) for Py3 compatibility
[m_lib.git] / m_lib / flad / fladc.py
index bbde04038571c1e2f51f151656bf184e4d3b1a64..d30aa445dca8b460b1c8b8a61fa2f29cd83fb647 100644 (file)
@@ -1,7 +1,5 @@
 """
    Flat ASCII Database to implement VERY simple config files.
-
-   Written by Broytman. Copyright (C) 1997-2005 PhiloSoft Design
 """
 
 
@@ -36,8 +34,8 @@ class Flad_Conf(dict):
       db = self.__make_db()
       db.load_file(f)
 
-      if len(db) <> 1:
-         raise error, "incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db))
+      if len(db) != 1:
+         raise error("incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db)))
 
       self.data = db[0]
 
@@ -46,8 +44,8 @@ class Flad_Conf(dict):
       db = self.__make_db()
       db.load_from_file(f)
 
-      if len(db) <> 1:
-         raise error, "incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db))
+      if len(db) != 1:
+         raise error("incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db)))
 
       self.data = db[0]