From b75585f26cd4e0397543613f80223f8dd9f0415f Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Wed, 7 Jul 2021 21:49:56 +0300
Subject: [PATCH] Rewritten the weird imports in debug

---
 src/debug.py | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/src/debug.py b/src/debug.py
index 3acd8e2c..a70cb543 100644
--- a/src/debug.py
+++ b/src/debug.py
@@ -35,26 +35,15 @@ Logging is thread-safe so you don't have to worry about locks,
 just import and log.
 """
 
-# import ConfigParser
-import sys
-if sys.version_info[0] == 3:
-    # python 3
-    import configparser as ConfigParser
-else:
-    # python 2
-    import ConfigParser
-
 import logging
 import logging.config
 import os
 import sys
 
-if sys.version_info[0] == 3:
-    from . import helper_startup
-    from . import state
-else:
-    import helper_startup
-    import state
+from six.moves import configparser
+
+import helper_startup
+import state
 
 helper_startup.loadConfig()
 
@@ -86,7 +75,7 @@ def configureLogging():
             False,
             'Loaded logger configuration from %s' % logging_config
         )
-    except (OSError, ConfigParser.NoSectionError, KeyError):
+    except (OSError, configparser.NoSectionError, KeyError):
         if os.path.isfile(logging_config):
             fail_msg = \
                 'Failed to load logger configuration from %s, using default' \