From 5faff969db8f2003de5e79fd3db600d28b286327 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 28 Feb 2022 12:47:17 +0100 Subject: [PATCH] Fix import of parser --- src/procrusql/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/procrusql/__init__.py b/src/procrusql/__init__.py index e71d9ce..0d5c736 100644 --- a/src/procrusql/__init__.py +++ b/src/procrusql/__init__.py @@ -5,6 +5,8 @@ import psycopg2 from psycopg2 import sql from psycopg2 import extras +from . import parser + log = logging.getLogger(__name__) log_action = log.getChild("action") log_check = log.getChild("check") @@ -247,14 +249,14 @@ def main(): logging.basicConfig(format="%(asctime)s %(levelname)s %(name)s %(lineno)d | %(message)s", level=logging.DEBUG) with open(sys.argv[1]) as rf: text = rf.read() - ps = procrusql.parser.ParseState(text) + ps = parser.ParseState(text) - ps2 = procrusql.parser.parse_ruleset(ps) + ps2 = parser.parse_ruleset(ps) if not ps2: ps.printerror() sys.exit(1) db = psycopg2.connect(sys.argv[2]) - procrusql.fit(db, ps2.ast) + fit(db, ps2.ast)