From e3dc7988e9e8e97663643e713617d9f4bdad3c6d Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 22 Jun 2021 13:40:08 -0700 Subject: [PATCH] Make strip-ansi Mac-only --- dangerzone/gui/__init__.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dangerzone/gui/__init__.py b/dangerzone/gui/__init__.py index 045d13339..932ddebb6 100644 --- a/dangerzone/gui/__init__.py +++ b/dangerzone/gui/__init__.py @@ -5,7 +5,6 @@ import click import uuid from PySide2 import QtCore, QtWidgets -from strip_ansi import strip_ansi from .common import GuiCommon from .main_window import MainWindow @@ -55,6 +54,8 @@ def gui_main(custom_container, filename): # Strip ANSI colors from stdout output, to prevent terminal colors from breaking # the macOS GUI app + from strip_ansi import strip_ansi + class StdoutFilter: def __init__(self, stream): self.stream = stream diff --git a/pyproject.toml b/pyproject.toml index 32144ce55..06bf8524e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,8 @@ wmi = {version = "*", platform = "win32"} pyxdg = {version = "*", platform = "linux"} pyobjc-core = {version = "*", platform = "darwin"} pyobjc-framework-launchservices = {version = "*", platform = "darwin"} +strip-ansi = {version = "*", platform = "darwin"} colorama = "^0.4.4" -strip-ansi = "^0.1.1" [tool.poetry.dev-dependencies] pyinstaller = {version = "*", platform = "darwin"}