Updated import placement based on python version dependencies

This commit is contained in:
kuldeep.k@cisinlabs.com 2021-10-11 21:00:37 +05:30
parent 64f89f319b
commit 8dd4a329e6
No known key found for this signature in database
GPG Key ID: AF4FB299BF7C7C2A

View File

@ -5,9 +5,7 @@ and suggest how it may be installed
import os
import re
import subprocess
import sys
from importlib import import_module
# Only really old versions of Python don't have sys.hexversion. We don't
# support them. The logging module was introduced in Python 2.3
@ -19,6 +17,9 @@ if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0:
)
import logging # noqa:E402
import subprocess
from importlib import import_module
# We can now use logging so set up a simple configuration
formatter = logging.Formatter('%(levelname)s: %(message)s')