Skip to content

Commit

Permalink
Manually merge PR189 to also work around the low-level bug (issue 187…
Browse files Browse the repository at this point in the history
…) with yaml used through the C-API specifically on Rocky 8. Follow-up to PR188 fixing the issue on Rocky 9.

git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6205 b75ad72c-e7d7-11dd-a971-7dbc132099af
  • Loading branch information
jonasbardino committed Jan 29, 2025
1 parent d8636b9 commit cb0604d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mig/shared/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@
# seen in sshd+sftpsubsys sessions. Apparently there's a bug / C-API
# incompatibility when using yaml in embedded python interpreters,
# due to yaml using its own nested C-extensions. In practice it
# results in a metaclass conflict TypeError upon yaml re-init there
# like described in
# results in a metaclass conflict TypeError or SystemError upon yaml
# re-init there like described in
# https://github.com/ros-drivers/rosserial/issues/450
# On Rocky 9 it's the TypeError and on Rocky 8 the SystemError.
try:
import json
except ImportError:
Expand All @@ -57,7 +58,7 @@
import yaml
except ImportError:
yaml = None
except TypeError:
except (TypeError, SystemError):
# NOTE: this should not really happen but it does with sshd+sftpsubsys in
# our PAM module hooking into this code as described above. We don't
# actually need yaml in that case so just silently ignore it here and
Expand Down

0 comments on commit cb0604d

Please sign in to comment.