Skip to content

Commit

Permalink
Fix except clause, close #14
Browse files Browse the repository at this point in the history
  • Loading branch information
WaxyMocha committed Feb 6, 2021
1 parent 1d8f08e commit bbd83bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WoeUSB/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import threading
import subprocess
import urllib.request
import urllib.error
from datetime import datetime

import WoeUSB.utils as utils
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bbd83bd

Please sign in to comment.