Skip to content

Commit 48a4fd1

Browse files
committed
refactor: remove duplicate pydyf monkey-patch block to avoid recursion
1 parent 9ef5d76 commit 48a4fd1

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

api/nodes/pdf_builder_node.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@ def _patched_pdf_init(self, *args, **kwargs):
2121
logging.getLogger(__name__).error(f"Error patching pydyf.PDF.__init__: {e}")
2222

2323
from weasyprint import HTML
24-
25-
# Monkey-patch PyDyf PDF constructor to accept extra args for compatibility
26-
try:
27-
import pydyf
28-
_orig_pdf_init = pydyf.PDF.__init__
29-
def _patched_pdf_init(self, *args, **kwargs):
30-
return _orig_pdf_init(self)
31-
pydyf.PDF.__init__ = _patched_pdf_init
32-
logging.getLogger(__name__).info("Patched pydyf.PDF.__init__ to accept extra args")
33-
except ImportError:
34-
logging.getLogger(__name__).warning("pydyf not installed; cannot patch PDF constructor")
35-
except Exception as e:
36-
logging.getLogger(__name__).error(f"Error patching pydyf.PDF.__init__: {e}")
37-
3824
# Node decorator with retry logic
3925
class Node:
4026
def __init__(self, retries: int = 0):

0 commit comments

Comments
 (0)