Skip to content

Commit

Permalink
Merge pull request #106 from ken-lauer/cln_cell_magic
Browse files Browse the repository at this point in the history
MAINT: do not log cell magic exception when IPython unavailable
  • Loading branch information
ChristopherMayes authored Nov 5, 2024
2 parents 8c01665 + f80a99e commit 4e9c871
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pytao/interface.tpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ def __init__(
)
try:
self.register_cell_magic()
except NameError:
# Not in IPython
pass
except Exception:
logger.debug("Failed to register cell magic", exc_info=True)

Expand Down
5 changes: 4 additions & 1 deletion pytao/interface_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# AUTOGENERATED FILE - DO NOT MODIFY
# This file was generated by the script `generate_interface_commands.py`.
# Any modifications may be overwritten.
# Generated on: 2024-10-21 10:37:29
# Generated on: 2024-10-22 09:58:32
# ==============================================================================

from __future__ import annotations
Expand Down Expand Up @@ -403,6 +403,9 @@ def __init__(
)
try:
self.register_cell_magic()
except NameError:
# Not in IPython
pass
except Exception:
logger.debug("Failed to register cell magic", exc_info=True)

Expand Down
2 changes: 1 addition & 1 deletion pytao/tests/test_interface_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# AUTOGENERATED FILE - DO NOT MODIFY
# This file was generated by the script `generate_interface_commands.py`.
# Any modifications may be overwritten.
# Generated on: 2024-10-21 10:37:29
# Generated on: 2024-10-22 09:58:32
# ==============================================================================

from .conftest import ensure_successful_parsing, new_tao
Expand Down

0 comments on commit 4e9c871

Please sign in to comment.