Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type error in TornadoImporter #56094

Merged
merged 1 commit into from
Mar 10, 2020
Merged

Fix type error in TornadoImporter #56094

merged 1 commit into from
Mar 10, 2020

Conversation

dwoz
Copy link
Contributor

@dwoz dwoz commented Feb 8, 2020

What does this PR do?

Fixes tracebacks in salt loader because the find_module method of TornadoImporter required 3 arguments, path should default to None.

Traceback (most recent call last):
  File "/tmp/kitchen/testing/salt/loader.py", line 1607, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/tmp/kitchen/testing/salt/grains/esxi.py", line 16, in <module>
    import salt.modules.vsphere
  File "/tmp/kitchen/testing/salt/modules/vsphere.py", line 222, in <module>
    import jsonschema
  File "/tmp/kitchen/testing/.nox/runtests-parametrized-2-7-coverage-true-crypto-none-transport-zeromq/lib/python2.7/site-packages/jsonschema/__init__.py", line 18, in <module>
    from jsonschema.validators import (
  File "/tmp/kitchen/testing/.nox/runtests-parametrized-2-7-coverage-true-crypto-none-transport-zeromq/lib/python2.7/site-packages/jsonschema/validators.py", line 170, in <module>
    meta_schema=_utils.load_schema("draft3"),
  File "/tmp/kitchen/testing/.nox/runtests-parametrized-2-7-coverage-true-crypto-none-transport-zeromq/lib/python2.7/site-packages/jsonschema/_utils.py", line 57, in load_schema
    data = pkgutil.get_data('jsonschema', "schemas/{0}.json".format(name))
  File "/usr/lib64/python2.7/pkgutil.py", line 578, in get_data
    loader = get_loader(package)
  File "/usr/lib64/python2.7/pkgutil.py", line 464, in get_loader
    return find_loader(fullname)
  File "/usr/lib64/python2.7/pkgutil.py", line 475, in find_loader
    loader = importer.find_module(fullname)
TypeError: find_module() takes exactly 3 arguments (2 given)

What issues does this PR fix or reference?

#56063

Tests written?

Yes

Commits signed with GPG?

Yes

@dwoz dwoz requested a review from a team as a code owner February 8, 2020 02:12
@ghost ghost requested a review from Ch3LL February 8, 2020 02:12
@dwoz dwoz merged commit 211c88b into saltstack:master Mar 10, 2020
@tutume
Copy link

tutume commented Mar 13, 2020

I'm not sure if it is related, but the behaviour matches.

I'm doing some tests and have 2 clean install, I did both today based on repo.saltstack.com orientation of Python 3 version for eath OS ,1 Ubuntu 18.04 and 2 Windows 10 Pro 1909.

The issue happens where I already have python installed (Ubuntu and one of the Windows 10's)
The second Windows 10, without python preinstalled, runs with no issue at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3000.1 vulnerable version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants