From 5f9a66ae61c012739cb25285d1e1ef91d50c9992 Mon Sep 17 00:00:00 2001 From: Chuddah Date: Tue, 18 Feb 2020 21:20:05 +0000 Subject: [PATCH] Removed debug code. --- jellyfin_kodi/full_sync.py | 3 +-- jellyfin_kodi/helper/debug.py | 37 ----------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 jellyfin_kodi/helper/debug.py diff --git a/jellyfin_kodi/full_sync.py b/jellyfin_kodi/full_sync.py index da75812c..a3226a65 100644 --- a/jellyfin_kodi/full_sync.py +++ b/jellyfin_kodi/full_sync.py @@ -11,7 +11,7 @@ from kodi_six import xbmc import downloader as server import helper.xmls as xmls from database import Database, get_sync, save_sync, jellyfin_db -from helper import translate, settings, window, progress, dialog, LibraryException, debug +from helper import translate, settings, window, progress, dialog, LibraryException from helper.utils import get_screensaver, set_screensaver ################################################################################################## @@ -249,7 +249,6 @@ class FullSync(object): raise @progress() - @debug.profile def movies(self, library, dialog): ''' Process movies from a single library. diff --git a/jellyfin_kodi/helper/debug.py b/jellyfin_kodi/helper/debug.py deleted file mode 100644 index f73dc2e0..00000000 --- a/jellyfin_kodi/helper/debug.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################################## - -import cProfile -import json -import logging -import pstats -import StringIO - -################################################################################################## - -LOG = logging.getLogger("JELLYFIN." + __name__) - -class JsonDebugPrinter(object): - - def __init__(self, json): - self.json = json - - def __str__(self): - return json.dumps(self.json, indent=4) - -def profile(fn): - def profiling_wrapper(*args, **kargs): - pr = cProfile.Profile() - pr.enable() - - fn(*args, **kargs) - - pr.disable() - s = StringIO.StringIO() - sortby = 'cumulative' - ps = pstats.Stats(pr, stream=s).sort_stats(sortby) - ps.print_stats() - LOG.debug(s.getvalue()) - return profiling_wrapper -