Skip to content

Commit

Permalink
Fix houdini exec with exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sisoe24 committed Nov 18, 2024
1 parent 7edd773 commit 2225f24
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Nuke-specific plugin for the NukeServerSocket."""
from __future__ import annotations

import traceback
from typing import Optional

from PySide2.QtWidgets import QWidget
Expand All @@ -14,7 +15,10 @@
class HoudiniController(BaseController):
def execute(self, data: ReceivedData) -> str:
with stdoutIO() as s:
exec(data.text, globals())
try:
exec(data.text, globals())

Check warning on line 19 in nukeserversocket/controllers/houdini/scripts/python/app/main.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

nukeserversocket/controllers/houdini/scripts/python/app/main.py#L19

Use of exec
except Exception:
return traceback.format_exc()
return s.getvalue()


Expand Down

0 comments on commit 2225f24

Please sign in to comment.