gui: fix importing fuse and displaying error

This commit is contained in:
Ian Burgwin 2021-01-07 08:30:14 -08:00
parent c2e330cbfd
commit 9d016f776b
No known key found for this signature in database
GPG Key ID: 90725113CA578EAA

View File

@ -138,7 +138,7 @@ class NinfsGUI(tk.Tk):
def check_fuse(self):
try:
from ninfs import fuse
import fuse
except EnvironmentError as e:
if e.args[0] == 'Unable to find libfuse':
if is_windows:
@ -159,7 +159,7 @@ class NinfsGUI(tk.Tk):
mb.showerror('Failed to load libfuse.')
return False
except Exception:
mb.showerror('Failed to import fusepy.\n\n' + format_exc())
mb.showerror('Failed to import fusepy', 'Failed to import fusepy.\n\n' + format_exc())
return False
return True