Skip to content

Commit

Permalink
Workaround for version dependant functionality
Browse files Browse the repository at this point in the history
Fixes Error:
  cannot import name 'is_enterprise_edition' from 'cmk.utils.version'
  • Loading branch information
nedjitef committed May 13, 2024
1 parent b4e364c commit f32482e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mkp/web/plugins/wato/log4j_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
Alternative,
FixedValue,
)
from cmk.utils.version import (
is_enterprise_edition,
is_managed_edition,
)


if is_managed_edition() or is_enterprise_edition():
try:
from cmk.utils.version import (
is_enterprise_edition,
is_managed_edition,
)


from cmk.gui.cee.plugins.wato.agent_bakery.rulespecs.utils import (
RulespecGroupMonitoringAgentsAgentPlugins
)
Expand Down Expand Up @@ -59,3 +61,6 @@ def _valuespec_agent_config_log4j_scanner():
name="agent_config:log4j_scanner",
valuespec=_valuespec_agent_config_log4j_scanner,
))

except:
pass

0 comments on commit f32482e

Please sign in to comment.