/opt/imh-python/lib/python3.9/site-packages/fabric
NameSizeModeActions
contrib/-0755rm
__pycache__/-0755rm
api.py11820644editdlrm
auth.py7220644editdlrm
colors.py14390644editdlrm
context_managers.py207480644editdlrm
decorators.py72750644editdlrm
docs.py25160644editdlrm
exceptions.py9570644editdlrm
io.py110530644editdlrm
job_queue.py80240644editdlrm
main.py270100644editdlrm
network.py270230644editdlrm
operations.py531320644editdlrm
sftp.py128350644editdlrm
state.py134940644editdlrm
tasks.py160550644editdlrm
task_utils.py28070644editdlrm
thread_handling.py7310644editdlrm
utils.py132140644editdlrm
version.py24960644editdlrm
__init__.py600644editdlrm
__main__.py380644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/fabric/thread_handling.py (731B)
import threading import six import sys class ThreadHandler(object): def __init__(self, name, callable, *args, **kwargs): # Set up exception handling self.exception = None def wrapper(*args, **kwargs): try: callable(*args, **kwargs) except BaseException: self.exception = sys.exc_info() # Kick off thread thread = threading.Thread(None, wrapper, name, args, kwargs) thread.setDaemon(True) thread.start() # Make thread available to instantiator self.thread = thread def raise_if_needed(self): if self.exception: e = self.exception six.reraise(e[0], e[1], e[2])