Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

IPP bistro parsing crashes #20

Closed
COM8 opened this issue Feb 12, 2018 · 1 comment
Closed

IPP bistro parsing crashes #20

COM8 opened this issue Feb 12, 2018 · 1 comment

Comments

@COM8
Copy link
Contributor

COM8 commented Feb 12, 2018

The IPP parser for the current week crashes, because there are no dishes on Wednesday available.
Link to the PDF.

The parser fails here

        positions = [(a.start(), a.end()) for a in list(re.finditer('Tagessuppe siehe Aushang', lines[0]))]
        if len(positions) != 5:
            # TODO handle special cases (e.g. that bistro is closed)
            return None

-> It returns None

How to reproduce:

$ python3 main.py ipp-bistro

Btw. I'm using #18 to fix the KW parsing crash.

@srehwald
Copy link
Owner

see #19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants