Skip to content

Commit ccde2c1

Browse files
Adapt omd update regarding issue with python 3.11.5
See the following links for details: * python/cpython#108525 * https://tribe29.slack.com/archives/C02EQJ2LH9N/p1699281739711269?thread_ts=1698734755.744989&cid=C02EQJ2LH9N Change-Id: I81511fae3421d3be5a21331d9c4576a8e04194e6
1 parent 4a342f0 commit ccde2c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

omd/packages/omd/omd.bin

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ PY_PAT = sys.version_info[2]
4040
# to the newer version "omd" command which made the newer OMD load the old
4141
# python libraries. Newer versions unset these variables before, so this
4242
# additional execv() is only needed when updating from older versions.
43-
if len(sys.argv) > 1 and sys.argv[1] == "update" and (PY_MAJ == 2 and PY_MIN == 7 and PY_PAT < 14):
43+
if (
44+
len(sys.argv) > 1
45+
and "update" in sys.argv
46+
and (
47+
(PY_MAJ == 2 and PY_MIN == 7 and PY_PAT < 14)
48+
or (PY_MAJ == 3 and PY_MIN in (10, 11) and PY_PAT < 5)
49+
)
50+
):
4451
# Prevent inheriting environment variables from this versions/site environment
4552
# into the execed omd call. The OMD call must import the python version related
4653
# modules and libaries. This only works when PYTHONPATH and LD_LIBRARY_PATH are

0 commit comments

Comments
 (0)