Skip to content

Commit

Permalink
0.0.12: Python3 fix (basestring->str)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaKyOtOx committed Jun 18, 2019
1 parent f530f2b commit a6e584f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions PatrowlEnginesUtils/PatrowlEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def reloadconfig(self):
def had_options(self, options):
"""Check if the engine is started with options."""
opts = []
if isinstance(options, basestring):
if isinstance(options, str):
opts.append(options)
elif isinstance(options, list):
opts = options
Expand Down Expand Up @@ -326,6 +326,7 @@ def _parse_results(self, scan_id):
"low": 0,
"medium": 0,
"high": 0,
"critical": 0,
}

for issue in self.scans[scan_id]["findings"]:
Expand All @@ -338,6 +339,7 @@ def _parse_results(self, scan_id):
"nb_low": nb_vulns["low"],
"nb_medium": nb_vulns["medium"],
"nb_high": nb_vulns["high"],
"nb_critical": nb_vulns["critical"],
"engine_name": self.name,
"engine_version": self.version
}
Expand Down Expand Up @@ -495,7 +497,7 @@ def add_issue(self, issue):
def had_options(self, options):
"""Check if the scan is started with options."""
opts = []
if isinstance(options, basestring):
if isinstance(options, str):
opts.append(options)
elif isinstance(options, list):
opts = options
Expand Down
2 changes: 1 addition & 1 deletion PatrowlEnginesUtils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


__title__ = 'patrowl_engine_utils'
__version__ = '0.0.11'
__version__ = '0.0.12'
__author__ = 'Nicolas MATTIOCCO'
__license__ = 'AGPLv3'
__copyright__ = 'Copyright (C) 2018-2019 Nicolas Mattiocco - @MaKyOtOx'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='PatrowlEnginesUtils',
version='0.0.11',
version='0.0.12',
description='Common classes for PatrowlEngines',
url='https://github.com/Patrowl/PatrowlEnginesUtils',
author='Nicolas Mattiocco',
Expand Down

0 comments on commit a6e584f

Please sign in to comment.