From 52d0b29702359c37352ed2194de05fa8db201b8f Mon Sep 17 00:00:00 2001 From: evilhero Date: Wed, 27 Jan 2016 03:57:27 -0500 Subject: [PATCH] FIX:(#1197) Startup errors on Windows systems after last commit related to stderr/stdout problems, FIX: Selecting copy/move option from GUI configuration wouldn't retain settings, FIX: Removed unnecessary stdout calls from included CT module, FIX: When copy/moving during post-processing and meta-tagging enabled, won't move files to tag if copy is selected --- Mylar.py | 3 ++ data/interfaces/default/comicdetails.html | 4 +-- data/interfaces/default/config.html | 2 +- lib/comictaggerlib/cli.py | 40 +++++++++++------------ lib/comictaggerlib/main.py | 2 +- mylar/PostProcessor.py | 4 +++ mylar/__init__.py | 9 ++--- mylar/cmtagmylar.py | 16 +++++---- mylar/webserve.py | 14 ++++---- 9 files changed, 53 insertions(+), 41 deletions(-) diff --git a/Mylar.py b/Mylar.py index 9fe4af94..b03cb915 100644 --- a/Mylar.py +++ b/Mylar.py @@ -32,6 +32,9 @@ try: except ImportError: import lib.argparse as argparse +if ( sys.platform == 'win32' and sys.executable.split( '\\' )[-1] == 'pythonw.exe'): + sys.stdout = open(os.devnull, "w") + sys.stderr = open(os.devnull, "w") def handler_sigterm(signum, frame): mylar.SIGNAL = 'shutdown' diff --git a/data/interfaces/default/comicdetails.html b/data/interfaces/default/comicdetails.html index a450dd28..be742c80 100644 --- a/data/interfaces/default/comicdetails.html +++ b/data/interfaces/default/comicdetails.html @@ -460,7 +460,7 @@ %endif %if mylar.ENABLE_META: - + %endif %endif @@ -603,7 +603,7 @@ %endif %if mylar.ENABLE_META: - + %endif %endif