From bbd83bd10047a924cc7028ddfb6ddeff02f8b479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Szyma=C5=84ski?= Date: Sat, 6 Feb 2021 12:29:03 +0100 Subject: [PATCH] Fix except clause, close #14 --- WoeUSB/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WoeUSB/core.py b/WoeUSB/core.py index e6d61ff..7180e46 100644 --- a/WoeUSB/core.py +++ b/WoeUSB/core.py @@ -9,6 +9,7 @@ import threading import subprocess import urllib.request +import urllib.error from datetime import datetime import WoeUSB.utils as utils @@ -373,7 +374,7 @@ def install_uefi_ntfs_support_partition(uefi_ntfs_partition, download_directory) try: file = urllib.request.urlretrieve("https://github.com/pbatard/rufus/raw/master/res/uefi/", "uefi-ntfs.img")[0] - except urllib.request.ContentTooShortError: + except (urllib.error.ContentTooShortError, urllib.error.HTTPError, urllib.error.URLError): utils.print_with_color( _("Warning: Unable to download UEFI:NTFS partition image from GitHub, installation skipped. Target device might not be bootable if the UEFI firmware doesn't support NTFS filesystem."), "yellow") return 1