[pitivi] loggable: Use threading instead of _thread
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] loggable: Use threading instead of _thread
- Date: Tue, 6 May 2014 13:01:52 +0000 (UTC)
commit a191bf9416c34fe7fb6223b7cb67ac804f5e50a3
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Apr 2 16:09:04 2014 +0200
loggable: Use threading instead of _thread
pitivi/utils/loggable.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/utils/loggable.py b/pitivi/utils/loggable.py
index 5f60d1e..f4f9a9f 100644
--- a/pitivi/utils/loggable.py
+++ b/pitivi/utils/loggable.py
@@ -19,16 +19,16 @@
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301, USA.
+import collections
import errno
import sys
import re
import os
import fnmatch
+import threading
import time
import types
import traceback
-import _thread
-import collections
# environment variables controlling levels for each category
@@ -635,7 +635,8 @@ def stderrHandler(level, object, category, file, line, message):
# level pid object cat time
# 5 + 1 + 7 + 1 + 32 + 1 + 17 + 1 + 15 == 80
safeprintf(sys.stderr, '%s [%5d] [0x%12x] %-32s %-17s %-15s %-4s %s %s\n',
- getFormattedLevelName(level), os.getpid(), _thread.get_ident(),
+ getFormattedLevelName(level), os.getpid(),
+ threading.current_thread().ident,
o[:32], category, time.strftime("%b %d %H:%M:%S"), "",
message, where)
sys.stderr.flush()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]