mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:20:43 +01:00
Runs pyupgrade to Python 3.8+ and adds a hook for it
This commit is contained in:
@@ -24,7 +24,7 @@ def worker_int(worker):
|
||||
## get traceback info
|
||||
import threading, sys, traceback
|
||||
|
||||
id2name = dict([(th.ident, th.name) for th in threading.enumerate()])
|
||||
id2name = {th.ident: th.name for th in threading.enumerate()}
|
||||
code = []
|
||||
for threadId, stack in sys._current_frames().items():
|
||||
code.append("\n# Thread: %s(%d)" % (id2name.get(threadId, ""), threadId))
|
||||
|
||||
Reference in New Issue
Block a user