diff --git a/gui/slick/interfaces/default/home.tmpl b/gui/slick/interfaces/default/home.tmpl index 12cf6a95..378b831c 100644 --- a/gui/slick/interfaces/default/home.tmpl +++ b/gui/slick/interfaces/default/home.tmpl @@ -9,7 +9,7 @@ #set global $sbPath = ".." #set global $topmenu="home"# -#import os.path +#import os.pat #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #set $myDB = $db.DBConnection() diff --git a/sickbeard/encodingKludge.py b/sickbeard/encodingKludge.py index 0c182804..ffef1d2b 100644 --- a/sickbeard/encodingKludge.py +++ b/sickbeard/encodingKludge.py @@ -17,17 +17,8 @@ # along with SickRage. If not, see . import os -import traceback -import re -import sickbeard -import six import chardet -import unicodedata - -from string import ascii_letters, digits -from sickbeard import logger -from unidecode import unidecode - +import sickbeard def _toUnicode(x): try: diff --git a/sickbeard/logger.py b/sickbeard/logger.py index e426daba..4abbfdea 100644 --- a/sickbeard/logger.py +++ b/sickbeard/logger.py @@ -26,6 +26,7 @@ import platform import sickbeard from sickbeard import classes +from sickbeard.encodingKludge import ek from github import Github from pastebin import PastebinAPI @@ -149,10 +150,11 @@ class Logger(object): pastebin_url = None try: if self.logFile and os.path.isfile(self.logFile): - with ek.ek(open, self.logFile) as f: - data = f.readlines(50) + with ek(open, self.logFile) as f: + data = f.readlines() + data = "".join(data[len(data) - 100:]) pastebin_url = PastebinAPI().paste('f59b8e9fa1fc2d033e399e6c7fb09d19', data) - except: + except Exception as e: pass try: