diff options
author | diSabler <dissy@ya.ru> | 2017-08-07 20:43:30 +0300 |
---|---|---|
committer | diSabler <dissy@ya.ru> | 2017-08-07 20:43:30 +0300 |
commit | 75ea701cdd72fc2e7a74f2205cfd6ae7a5d7812d (patch) | |
tree | 0dcf8bfbef9a69c70e8fa49bc546b0e27976906f | |
parent | 119275bfd3bd1e6634fedface46db1946ed724b3 (diff) |
fix: RTL/LTR in logs #2
-rw-r--r-- | plugins/logger.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/logger.py b/plugins/logger.py index 603643a..1657700 100644 --- a/plugins/logger.py +++ b/plugins/logger.py @@ -63,7 +63,7 @@ if not os.path.exists(LOG_FOLDER % ''): os.mkdir(LOG_FOLDER % '') def lr(t): - return ''.join([['?', l][12288>=ord(l)<=40960] for l in t]) + return t.replace('\xe2\x80\xae', '?') def cmd_log(raw_in, text): if LOG_URL: @@ -103,7 +103,7 @@ def logger(raw_in): if FOLDER: DATE = ['%02d' % t for t in time.localtime()[:3]] FOLDER_RAW = '%s/%s/.template' % (FOLDER, '/'.join(DATE[:-1])) - if os.path.exists(LOG_FOLDER % FOLDER_RAW) and time.localtime(os.path.getctime(LOG_FOLDER % FOLDER_RAW))[2] != time.localtime()[2]: + if os.path.exists(LOG_FOLDER % FOLDER_RAW) and time.localtime(os.path.getmtime(LOG_FOLDER % FOLDER_RAW))[2] != time.localtime()[2]: os.remove(LOG_FOLDER % FOLDER_RAW) FOLDER_HTML = '%s/%s.html' % (FOLDER, '/'.join(DATE)) if not os.path.exists(LOG_FOLDER % FOLDER): |