From 69a06cc29e8d3e101d7349c754f8559ff421f66c Mon Sep 17 00:00:00 2001 From: Kingu Date: Thu, 11 Mar 2021 11:14:48 +0100 Subject: [PATCH] Veracrypt fix - error handling due to website down --- clients/veracrypt.py | 8 ++++++-- start.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/clients/veracrypt.py b/clients/veracrypt.py index 1dcf157..adc0651 100644 --- a/clients/veracrypt.py +++ b/clients/veracrypt.py @@ -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 @@ -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") #

Latest Stable Release - 1.21 (Sunday July 9, 2017)

diff --git a/start.py b/start.py index 665fdee..af5f659 100644 --- a/start.py +++ b/start.py @@ -14,7 +14,7 @@ import argparse import vergrabber -__version__ = '4.2.3' +__version__ = '4.2.4' __author__ = 'Tomasz Krol' __author_email__ = 'vergrabber@kingu.pl'