Skip to content

Commit 4ebefdc

Browse files
committed
clean up debug hook
1 parent eec28db commit 4ebefdc

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

reasoning/util.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import sys
32
import time
43
import logging
54
import argparse
@@ -133,20 +132,3 @@ def detect_variables(cfg_file):
133132
ast = env.parse(raw)
134133
vars = meta.find_undeclared_variables(ast)
135134
return vars
136-
137-
138-
class DebugHook:
139-
instance = None
140-
141-
def __call__(self, *args, **kwargs):
142-
if comm.get_rank() > 0:
143-
while True:
144-
pass
145-
146-
if self.instance is None:
147-
from IPython.core import ultratb
148-
self.instance = ultratb.FormattedTB(mode="Plain", color_scheme="Linux", call_pdb=1)
149-
return self.instance(*args, **kwargs)
150-
151-
152-
sys.excepthook = DebugHook()

0 commit comments

Comments
 (0)