Skip to content

Commit

Permalink
undo change in PlanManager
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianPommerening committed Jul 25, 2024
1 parent becd892 commit 7969bb7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions driver/plan_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
from . import returncodes


_PLAN_INFO_REGEX = re.compile(r"; cost = (\d+) \((unit cost|general cost)\)")
_PLAN_INFO_REGEX = re.compile(r"; cost = (\d+) \((unit cost|general cost)\)\n")


def _read_last_line(path: Path):
lines = path.read_text().splitlines()
if lines:
return lines[-1]
line = None
with path.open() as input_file:
for line in input_file:
pass
return line


def _parse_plan(plan_path: Path):
Expand Down

0 comments on commit 7969bb7

Please sign in to comment.