Open-Future-Belgium / zabbix-papercut

Papercut Script For Zabbix 3.2
6 stars 13 forks source link

typo in device discover script #7

Open arturothepapercutemployee opened 3 years ago

arturothepapercutemployee commented 3 years ago

The py2 and py3 device discover scripts include a typo. Removing the ‘u’ overcomes the problem.

An error pointed out these lines when loading the Papercut Server Host Items Page.

https://github.com/Open-Future-Belgium/zabbix-papercut/blob/86a29219e7bd9022ce5c008d8f27d8496f25eb7a/linux/py2/discovery-devicestatus.py#L33

https://github.com/Open-Future-Belgium/zabbix-papercut/blob/86a29219e7bd9022ce5c008d8f27d8496f25eb7a/linux/py3/discovery-devicestatus.py#L35

Joffcom commented 3 years ago

Do you happen to have the error? The u prefix on the string indicates it is a Unicode string so it shouldn’t be matching for u'OK' just the OK.

arturothepapercutemployee commented 3 years ago

Nope. The issue came across my desk at PaperCut from a customer and the error message wasn't in their ticket. Still, I have a feeling that Unicode identification for strings manifests differently between Python 2 and 3. The customer in question had Python 3.9.5.

Trikke76 commented 10 months ago

i will try to have a look at everything next year and do some tests with zabbix 6 or 7

Joffcom commented 10 months ago

I am pretty sure this was working the last time I tested it but sadly Art no longer works for PaperCut and I am also no longer working in the PaperCut channel.