mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix type error in TornadoImporter
This commit is contained in:
parent
81eb152643
commit
7b1632e8e3
2 changed files with 9 additions and 1 deletions
|
@ -12,7 +12,7 @@ import importlib
|
|||
|
||||
class TornadoImporter(object):
|
||||
|
||||
def find_module(self, module_name, package_path):
|
||||
def find_module(self, module_name, package_path=None):
|
||||
if module_name.startswith('tornado'):
|
||||
return self
|
||||
return None
|
||||
|
|
|
@ -14,6 +14,7 @@ from tests.support.runtests import RUNTIME_VARS
|
|||
import tests.support.helpers
|
||||
|
||||
# Import Salt libs
|
||||
import salt
|
||||
import salt.ext.six
|
||||
import salt.modules.cmdmod
|
||||
import salt.utils.platform
|
||||
|
@ -95,3 +96,10 @@ class VendorTornadoTest(TestCase):
|
|||
log.error("Test found bad line: %s", line)
|
||||
valid_lines.append(line)
|
||||
assert valid_lines == [], len(valid_lines)
|
||||
|
||||
def test_regression_56063(self):
|
||||
importer = salt.TornadoImporter()
|
||||
try:
|
||||
importer.find_module('tornado')
|
||||
except TypeError:
|
||||
assert False, 'TornadoImporter raised type error when one argument passed'
|
||||
|
|
Loading…
Add table
Reference in a new issue