Skip to content

Instantly share code, notes, and snippets.

View eladweiss's full-sized avatar

eladweiss eladweiss

  • Mellanox
  • Israel
View GitHub Profile
@bsphere
bsphere / py_exceptions.py
Last active November 17, 2022 15:01
How to catch exceptions raised by Python worker threads
import Queue
import threading
class WorkerThread(threading.Thread):
def __init__(self, q):
super(WorkerThread, self).__init__()
self q = q
self.exception = None