From 6469c361f73eab768da017194979123e33b791c9 Mon Sep 17 00:00:00 2001
From: Dustyn Gibson <miigotu@gmail.com>
Date: Sun, 22 Nov 2015 07:30:35 -0800
Subject: [PATCH] Fix starting with pythonw

---
 SickBeard.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SickBeard.py b/SickBeard.py
index e9a3fa0d3..99816b585 100755
--- a/SickBeard.py
+++ b/SickBeard.py
@@ -152,7 +152,7 @@ class SickRage(object):
 
         # pylint: disable=E1101
         if not sickbeard.SYS_ENCODING or sickbeard.SYS_ENCODING.lower() in ('ansi_x3.4-1968', 'us-ascii', 'ascii', 'charmap') or \
-            (sys.platform.startswith('win') and sys.getwindowsversion()[0] >= 6 and getattr(sys.stdout, 'device', sys.stdout).encoding.lower() in ('cp65001', 'charmap')):
+            (sys.platform.startswith('win') and sys.getwindowsversion()[0] >= 6 and str(getattr(sys.stdout, 'device', sys.stdout).encoding).lower() in ('cp65001', 'charmap')):
             sickbeard.SYS_ENCODING = 'UTF-8'
 
         # TODO: Continue working on making this unnecessary, this hack creates all sorts of hellish problems
-- 
GitLab