zabbix_inventory PEP8 compliance. (#28680)

pull/28731/head
furhouse 7 years ago committed by René Moser
parent ca91b361ce
commit af9396841e

@ -37,7 +37,10 @@ from __future__ import print_function
import os import os
import sys import sys
import argparse import argparse
import ConfigParser try:
import ConfigParser as configparser
except ImportError:
import configparser
try: try:
from zabbix_api import ZabbixAPI from zabbix_api import ZabbixAPI
@ -55,7 +58,7 @@ except:
class ZabbixInventory(object): class ZabbixInventory(object):
def read_settings(self): def read_settings(self):
config = ConfigParser.SafeConfigParser() config = configparser.SafeConfigParser()
conf_path = './zabbix.ini' conf_path = './zabbix.ini'
if not os.path.exists(conf_path): if not os.path.exists(conf_path):
conf_path = os.path.dirname(os.path.realpath(__file__)) + '/zabbix.ini' conf_path = os.path.dirname(os.path.realpath(__file__)) + '/zabbix.ini'

Loading…
Cancel
Save