summaryrefslogtreecommitdiffstats
path: root/pyload/Core.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-16 17:11:23 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-16 17:11:48 +0100
commita9c70f13946de33962c604663434791483176017 (patch)
tree8117090a41689fd233cd0adf3e37a59f1db634d3 /pyload/Core.py
parentMoving new plugins from module to pyload (diff)
downloadpyload-a9c70f13946de33962c604663434791483176017.tar.xz
further improved caching, removed locale switch because of to much side-effects
Diffstat (limited to 'pyload/Core.py')
-rw-r--r--pyload/Core.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/pyload/Core.py b/pyload/Core.py
index a13346567..74739f800 100644
--- a/pyload/Core.py
+++ b/pyload/Core.py
@@ -35,7 +35,6 @@ from time import time, sleep
from traceback import print_exc
import locale
-
locale.locale_alias = locale.windows_locale = {} #save ~100kb ram, no known sideeffects for now
import subprocess
@@ -503,22 +502,7 @@ class Core(object):
def init_logger(self, level):
console = logging.StreamHandler(sys.stdout)
- # try to get a time formatting depending on system locale
- datefmt = None
- try: # change current locale to default if it is not set
- current_locale = locale.getlocale()
- if current_locale == (None, None):
- current_locale = locale.setlocale(locale.LC_ALL, '')
-
- # We use timeformat provided by locale when available
- if current_locale != (None, None):
- datefmt = locale.nl_langinfo(locale.D_FMT) + " " + locale.nl_langinfo(locale.T_FMT)
- except: # something did go wrong, locale is heavily platform dependant
- pass
-
- # default formatting when no one was obtained (ex.: 2013-10-22 18:27:46)
- if not datefmt:
- datefmt = "%Y-%m-%d %H:%M:%S"
+ datefmt = "%Y-%m-%d %H:%M:%S"
# file handler formatter
fhfmt = "%(asctime)s %(levelname)-8s %(message)s"