Skip to content

Bulk asynchronous downloader for multiple file hosts

fix: displays may be 0

NTFSvolume6785881a95fd
diff --git a/cyberdrop_dl/utils/utilities.py b/cyberdrop_dl/utils/utilities.py
index e6c11d650..6e4bbbe9f 100644
--- a/cyberdrop_dl/utils/utilities.py
+++ b/cyberdrop_dl/utils/utilities.py
@@ -379,8 +379,8 @@ async def send_webhook_message(manager: Manager) -> None:
def open_in_text_editor(file_path: Path) -> bool:
"""Opens file in OS text editor."""
using_desktop_enviroment = (
- os.environ.get("DISPLAY") or os.environ.get("WAYLAND_DISPLAY")
- ) and "SSH_CONNECTION" not in os.environ
+ any(var in os.environ for var in ("DISPLAY", "WAYLAND_DISPLAY")) and "SSH_CONNECTION" not in os.environ
+ )
default_editor = os.environ.get("EDITOR")
if platform.system() == "Darwin":
subprocess.Popen(["open", "-a", "TextEdit", file_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)