Dolda2000 GitWeb
/
pdm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de8587e
)
Made relevant Python3 changes.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 7 Jan 2013 07:03:52 +0000
(08:03 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 7 Jan 2013 07:03:52 +0000
(08:03 +0100)
pdm/util.py
patch
|
blob
|
blame
|
history
diff --git
a/pdm/util.py
b/pdm/util.py
index
53cc82a
..
38b0ba0
100644
(file)
--- a/
pdm/util.py
+++ b/
pdm/util.py
@@
-8,9
+8,9
@@
import sys, traceback, threading
def threads():
"Returns a dict of currently known threads, mapped to their respective frames."
def threads():
"Returns a dict of currently known threads, mapped to their respective frames."
- tt =
dict((th.ident, th) for th in threading.enumerate())
- return
dict((tt.get(key, key), val) for key, val in sys._current_frames().iteritems())
+ tt =
{th.ident: th for th in threading.enumerate()}
+ return
{tt.get(key, key): val for key, val in sys._current_frames().items()}
def traces():
"Returns the value of threads() with each frame expanded to a backtrace."
def traces():
"Returns the value of threads() with each frame expanded to a backtrace."
- return
dict((th, traceback.extract_stack(frame)) for th, frame in threads().iteritems())
+ return
{th: traceback.extract_stack(frame) for th, frame in threads().items()}