File howdy-configparser.patch of Package howdy

diff -up howdy-2.6.1/src/pam.py.orig howdy-2.6.1/src/pam.py
--- howdy-2.6.1/src/pam.py.orig	2023-09-28 14:26:24.034824526 +0200
+++ howdy-2.6.1/src/pam.py	2023-09-28 14:26:48.168527768 +0200
@@ -6,11 +6,17 @@ import os
 import glob
 import syslog
 
-# pam-python is running python 2, so we use the old module here
-import ConfigParser
-
+import sys
+# The config parser is named in python2 as ConfigParser but in python3 as configparser
+# and here is a workaround for this.
+if sys.version_info[0] == 2:
+    import ConfigParser
+    config = ConfigParser.ConfigParser()
+else:
+    import configparser
+    config = configparser.ConfigParser()
+ 
 # Read config from disk
-config = ConfigParser.ConfigParser()
 config.read(os.path.dirname(os.path.abspath(__file__)) + "/config.ini")
 
 
openSUSE Build Service is sponsored by