From f39e370e2a9347f297988372a59e14c8660b0aa4 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 26 Nov 2022 22:27:09 +0000 Subject: [PATCH] cosmetic --- bin/partyfuse-streaming.py | 12 ++++++------ bin/partyfuse.py | 12 ++++++------ bin/partyfuse2.py | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/bin/partyfuse-streaming.py b/bin/partyfuse-streaming.py index cc0633e1..6016b835 100755 --- a/bin/partyfuse-streaming.py +++ b/bin/partyfuse-streaming.py @@ -62,12 +62,12 @@ except: else: libfuse = "apt install libfuse\n modprobe fuse" - print( - "\n could not import fuse; these may help:" - + "\n python3 -m pip install --user fusepy\n " - + libfuse - + "\n" - ) + m = """\033[33m + could not import fuse; these may help: + {} -m pip install --user fusepy + {} +\033[0m""" + print(m.format(sys.executable, libfuse)) raise diff --git a/bin/partyfuse.py b/bin/partyfuse.py index 6997b0c4..824984bd 100755 --- a/bin/partyfuse.py +++ b/bin/partyfuse.py @@ -74,12 +74,12 @@ except: else: libfuse = "apt install libfuse3-3\n modprobe fuse" - print( - "\n could not import fuse; these may help:" - + "\n python3 -m pip install --user fusepy\n " - + libfuse - + "\n" - ) + m = """\033[33m + could not import fuse; these may help: + {} -m pip install --user fusepy + {} +\033[0m""" + print(m.format(sys.executable, libfuse)) raise diff --git a/bin/partyfuse2.py b/bin/partyfuse2.py index 0885a2b8..140ccd80 100755 --- a/bin/partyfuse2.py +++ b/bin/partyfuse2.py @@ -32,9 +32,19 @@ try: if not hasattr(fuse, "__version__"): raise Exception("your fuse-python is way old") except: - print( - "\n could not import fuse; these may help:\n python3 -m pip install --user fuse-python\n apt install libfuse\n modprobe fuse\n" - ) + if WINDOWS: + libfuse = "install https://github.com/billziss-gh/winfsp/releases/latest" + elif MACOS: + libfuse = "install https://osxfuse.github.io/" + else: + libfuse = "apt install libfuse\n modprobe fuse" + + m = """\033[33m + could not import fuse; these may help: + {} -m pip install --user fuse-python + {} +\033[0m""" + print(m.format(sys.executable, libfuse)) raise