aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/collectd-ves-app/ves_app/ves_app.py
diff options
context:
space:
mode:
Diffstat (limited to '3rd_party/collectd-ves-app/ves_app/ves_app.py')
-rw-r--r--3rd_party/collectd-ves-app/ves_app/ves_app.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/3rd_party/collectd-ves-app/ves_app/ves_app.py b/3rd_party/collectd-ves-app/ves_app/ves_app.py
index cf05a2b1..66dc8f2d 100644
--- a/3rd_party/collectd-ves-app/ves_app/ves_app.py
+++ b/3rd_party/collectd-ves-app/ves_app/ves_app.py
@@ -18,10 +18,14 @@
import json
import sys
import base64
-import ConfigParser
import logging
import argparse
+try:
+ import configparser
+except ImportError:
+ import ConfigParser as configparser
+
from distutils.util import strtobool
from kafka import KafkaConsumer
@@ -35,7 +39,6 @@ except ImportError:
# Fall back to Python 2's urllib2
import urllib2 as url
-
class VESApp(Normalizer):
"""VES Application"""
@@ -113,7 +116,7 @@ class VESApp(Normalizer):
def init(self, configfile, schema_file):
if configfile is not None:
# read VES configuration file if provided
- config = ConfigParser.ConfigParser()
+ config = configparser.ConfigParser()
config.optionxform = lambda option: option
config.read(configfile)
self.config(config)