diff --git a/src/pam.py b/src/pam.py index 08cccef0..4e5c8860 100644 --- a/src/pam.py +++ b/src/pam.py @@ -4,13 +4,16 @@ import subprocess import os import glob +import sys import syslog -# pam-python is running python 2, so we use the old module here -import ConfigParser +if sys.version_info >= (3,): + import configparser +else: + import ConfigParser as configparser # Read config from disk -config = ConfigParser.ConfigParser() +config = configparser.ConfigParser() config.read(os.path.dirname(os.path.abspath(__file__)) + "/config.ini")