Skip to content

Commit

Permalink
Merge pull request #46 from robert-w-gries/master
Browse files Browse the repository at this point in the history
Miscellaneous tweaks and fixes
  • Loading branch information
copelco authored Oct 14, 2020
2 parents dd3220c + 69222cc commit f5c6cb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM python:3

WORKDIR /usr/src/app

RUN curl https://xpdfreader-dl.s3.amazonaws.com/old/xpdf-3.04.tar.gz | tar xz
RUN chmod -R 755 ./xpdf-3.04 && cd ./xpdf-3.04/ && ./configure && make && make install

WORKDIR /usr/src/app
RUN pip install --no-cache-dir -r requirements.txt
COPY ./requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r /requirements.txt
2 changes: 1 addition & 1 deletion ciprs_reader/parser/section/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CaseDetails(HeaderParser):
"""Extract County and File No from header on top of first page"""

pattern = (
r"\s*Case (Details|Summary) for Court Case[\s:]+(?P<county>(\w\s*.*)+) (?P<fileno>\w+)"
r"\s*Case (Details|Summary) for Court Case[\s:]+(?P<county>.+) (?P<fileno>\w+)"
)

def extract(self, matches, report):
Expand Down
4 changes: 2 additions & 2 deletions ciprs_reader/reader/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def json_default(obj):
"""Helper function to JSON serialize objects when using dumps()."""
try:
return obj.__json__()
except AttributeError:
raise TypeError("{} can not be JSON encoded".format(type(obj)))
except AttributeError as invaild_object_type:
raise TypeError("{} can not be JSON encoded".format(type(obj))) from invaild_object_type


class LineReader:
Expand Down

0 comments on commit f5c6cb9

Please sign in to comment.