diff --git a/zabbix/zabbix_api.py b/zabbix/zabbix_api.py index 306ae28..3be67bd 100644 --- a/zabbix/zabbix_api.py +++ b/zabbix/zabbix_api.py @@ -43,13 +43,13 @@ __logger.log(10,"Starting logging") try: - # Python 2.5+ - import json - __logger.log(15,"Using native json library") -except ImportError: - # Python 2.4 + # Separate module or Python <2.6 import simplejson as json __logger.log(15,"Using simplejson library") +except ImportError: + # Python >=2.6 + import json + __logger.log(15,"Using native json library") class ZabbixAPIException(Exception): """ generic zabbix api exception