X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fflad%2Ffladc.py;h=af8ba37584efa514df39effc6033e2d805ce3230;hb=7f8cd12c390d9c7dacdec849982d7ca28f0a44e2;hp=6fd2f607cf19ebbe619b57764640887bee135406;hpb=87ed070d1b1776366d3ddd15eef1f37a45c585ea;p=m_lib.git diff --git a/m_lib/flad/fladc.py b/m_lib/flad/fladc.py index 6fd2f60..af8ba37 100644 --- a/m_lib/flad/fladc.py +++ b/m_lib/flad/fladc.py @@ -3,10 +3,13 @@ """ -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): @@ -35,7 +38,7 @@ class Flad_Conf(dict): 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)) + raise error("incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db))) self.data = db[0] @@ -45,7 +48,7 @@ class Flad_Conf(dict): 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)) + raise error("incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db))) self.data = db[0]