diff options
| author | Stanislav Boboň | 2020-10-15 10:31:58 +0200 |
|---|---|---|
| committer | Stanislav Boboň | 2020-10-15 10:31:58 +0200 |
| commit | f8d217445a684d80d5a77b9f7c736fbca3e440e5 (patch) | |
| tree | 4f03753df4939cd17cd401277056ef80bb8432d8 /src | |
| parent | 89798873bd7135396f2f357eb16818457114fd04 (diff) | |
| download | sec-certs-f8d217445a684d80d5a77b9f7c736fbca3e440e5.tar.gz sec-certs-f8d217445a684d80d5a77b9f7c736fbca3e440e5.tar.zst sec-certs-f8d217445a684d80d5a77b9f7c736fbca3e440e5.zip | |
catch all exceptions so we parse to the end
Diffstat (limited to 'src')
| -rw-r--r-- | src/fips_certificates.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fips_certificates.py b/src/fips_certificates.py index 89fa966a..ea73f5d6 100644 --- a/src/fips_certificates.py +++ b/src/fips_certificates.py @@ -327,8 +327,6 @@ def find_tables(txt, file_name, num_pages): # removing None and duplicates footers = [extract_page_number(x) for x in footer_complete] footers = list(dict.fromkeys([x for x in footers if x is not None and 0 < int(x) < num_pages])) - - print(footers) if footers: return footers @@ -363,7 +361,11 @@ def extract_certs_from_tables(list_of_files, html_items): lst = [] print("~~~~~~~~~~~~~~~", REDHAT_FILE, "~~~~~~~~~~~~~~~~~~~~~~~") - data = read_pdf(REDHAT_FILE[:-4], pages=[12], silent=True) + try: + data = read_pdf(REDHAT_FILE[:-4], pages=[12], silent=True) + except Exception: + not_decoded.append(REDHAT_FILE) + continue # find columns with cert numbers for df in data: for col in range(len(df.columns)): |
