Skip to content

Commit

Permalink
Veracrypt fix - error handling due to website down
Browse files Browse the repository at this point in the history
  • Loading branch information
twkrol committed Mar 11, 2021
1 parent ce2b247 commit 69a06cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions clients/veracrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
import copy
import urllib.request
from urllib.error import URLError
import re
from datetime import datetime, date
from bs4 import BeautifulSoup
Expand All @@ -21,9 +22,12 @@ def getEditions(template):
template.latest = False

# Looking for releases
body = urllib.request.urlopen("https://www.veracrypt.fr/en/Downloads.html").read()
soup = BeautifulSoup(body, "html5lib")
try:
body = urllib.request.urlopen("https://www.veracrypt.fr/en/Downloads.html").read()
except URLError:
return result

soup = BeautifulSoup(body, "html5lib")
h3 = soup.find("h3")
#<h3>Latest Stable Release - 1.21 (<span title="07/09/2017 23:00:00 AM">Sunday July 9, 2017</span>)</h3>

Expand Down
2 changes: 1 addition & 1 deletion start.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import argparse
import vergrabber

__version__ = '4.2.3'
__version__ = '4.2.4'
__author__ = 'Tomasz Krol'
__author_email__ = '[email protected]'

Expand Down

0 comments on commit 69a06cc

Please sign in to comment.