Skip to content

Commit

Permalink
Change to distutils, because packaging module isn't always installed
Browse files Browse the repository at this point in the history
  • Loading branch information
rbsec committed Mar 15, 2021
1 parent 70c1226 commit 60d1ec7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dnscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Licensed under GPLv3, see LICENSE for details
#
from __future__ import print_function
from packaging import version
from distutils.version import LooseVersion

import os
import platform
Expand Down Expand Up @@ -44,7 +44,7 @@
print("FATAL: Module dnspython missing (python-dnspython)")
sys.exit(1)

if (version.parse(dns.__version__) < version.parse("2.0.0")):
if (LooseVersion(dns.__version__) < LooseVersion("2.0.0")):
print("dnscan requires dnspython 2.0.0 or greater.\nYou can install it with `pip install -r requirements.txt`")
sys.exit(1)

Expand Down

0 comments on commit 60d1ec7

Please sign in to comment.