"""
Flat ASCII Database to implement VERY simple config files.
-
- Written by Broytman. Copyright (C) 1997-2005 PhiloSoft Design
"""
-import flad, fladm
+from m_lib.flad import flad, fladm
-error = "fladc.error" # Too many records
+from .flad import checking_error
+class error(checking_error):
+ # Too many records
+ pass
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]
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]