Skip to content

Commit 16dd01d

Browse files
committed
simplify part VI
1 parent 2045d13 commit 16dd01d

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

  • mkp/local/lib/python3/cmk/base/cee/plugins/bakery

mkp/local/lib/python3/cmk/base/cee/plugins/bakery/yum.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def get_yum_files(conf: Any) -> FileGenerator:
2121

2222
# default to no interval - will be filled if set in config
2323
interval = None
24+
deploy_plugin = False
2425

2526
if isinstance(conf, dict):
2627
deploy = conf.get('deploy')
@@ -30,6 +31,7 @@ def get_yum_files(conf: Any) -> FileGenerator:
3031
interval = int(conf.get('interval'))
3132
except (TypeError, ValueError):
3233
interval = None
34+
deploy_plugin = True
3335

3436
if isinstance(deploy, dict):
3537
interval = deploy.get('interval')
@@ -38,13 +40,15 @@ def get_yum_files(conf: Any) -> FileGenerator:
3840
interval = int(interval)
3941
except (TypeError, ValueError):
4042
interval = None
41-
42-
# only makes sense on Linux so just create for that OS
43-
yield Plugin(
44-
base_os=OS.LINUX,
45-
source=Path('yum'),
46-
interval=interval
47-
)
43+
deploy_plugin = True
44+
45+
if deploy_plugin:
46+
# only makes sense on Linux so just create for that OS
47+
yield Plugin(
48+
base_os=OS.LINUX,
49+
source=Path('yum'),
50+
interval=interval
51+
)
4852

4953

5054
# register the bakery plugin with its arguments

0 commit comments

Comments
 (0)