0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-10-17 10:06:53 +02:00

Merge pull request #719 from mikacousin/dev

Add python3 pam-python support
This commit is contained in:
boltgolt 2023-02-19 11:11:35 +01:00 committed by GitHub
commit 3306db358a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,13 +4,17 @@
import subprocess import subprocess
import os import os
import glob import glob
import sys
import syslog import syslog
# pam-python is running python 2, so we use the old module here if sys.version_info.major < 3:
import ConfigParser import ConfigParser
config = ConfigParser.ConfigParser()
else:
import configparser
config = configparser.ConfigParser()
# Read config from disk # Read config from disk
config = ConfigParser.ConfigParser()
config.read(os.path.dirname(os.path.abspath(__file__)) + "/config.ini") config.read(os.path.dirname(os.path.abspath(__file__)) + "/config.ini")