Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 0db403ea authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent c0e3be83
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ def main():
status_code = int(entry.get('status_code', 200))
log_message(f'bug return:PID: {pid}, Status: {status_code}, Version: {software_releases}')
path = expand_path(path_found + pid.replace('/', '_'))
# check if there where was an error, if so go to next pid
# check if there were was an error, if so go to next pid
if status_code == 200:
bugs = entry.get('bugs', None)
if bugs: # if new/changed bugs found
......
......@@ -83,9 +83,10 @@ def save_eox(eox, path):
if EOLProductID == '':
EOLProductID = PID.get('EOXInputValue')
with open(path + (EOLProductID.replace('/', '_')), 'w') as f:
json.dump(PID, f)
saved.append(EOLProductID)
if EOLProductID:
with open(path + (EOLProductID.replace('/', '_')), 'w') as f:
json.dump(PID, f)
saved.append(EOLProductID)
return saved
......@@ -105,7 +106,7 @@ def save_serials(eox, path):
for serial in eox:
EOXInputValue = serial.get('EOXInputValue')
if EOXInputValue != '':
if EOXInputValue:
with open(path + EOXInputValue, 'w') as f:
json.dump(serial, f)
saved.append(EOXInputValue)
......
......@@ -59,7 +59,7 @@ def sn2info_save_serials(sn2infos, path):
for sn2info in sn2infos:
serial = str(sn2info.get('sr_no'))
if serial != '':
if serial:
with open(path + serial, 'w') as f:
json.dump(sn2info, f)
saved.append(serial)
......
......@@ -34,7 +34,10 @@ from cmk.gui.utils.html import HTML
# to get the status colors and the clickable IDs for EOL, PSIRT and Bug you need to copy the file
# ~/lib/check_mk/gui/plugins/views/inventory.py to ~/local/lib/check_mk/gui/plugins/views.
# Then change the value of ENABLE_PAINTERS to True and restart the apache service (omd restart apache)
#
# in cmk 2.2.0 this work around don't work anymore. @decorate_inv_paint() was moved
# to ~/lib/check_mk/gui/views/inventory/__init__.py
#
ENABLE_PAINTERS = False
# #################################################################################
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment