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

Improve error message when module does not exist #24367

Merged
merged 1 commit into from
Jun 4, 2015

Conversation

terminalmage
Copy link
Contributor

This also simplifies the if/elif/else logic when the module does not exist.
The else would never be reached anyway since we are doing an
if X is not None followed by an if X is None.

This gives different and meaninful errors when a non-existant module is used,
as well as when a nonexistant function in an existing module is used.

[root@cent6 ~]# salt cent6 salt_util.sync_modules
cent6:
    Module 'salt_util' is not available.
[root@cent6 ~]# salt cent6 saltutil.sync_modulessss
cent6:
    'saltutil.sync_modulessss' is not available.

Fixes #22958

This also simplifies the if/elif/else logic when the module does not
exist. The else would never be reached anyway since we are doing an
``if X is not None`` followed by an ``if X is None``.

Fixes saltstack#22958
@twangboy
Copy link
Contributor

twangboy commented Jun 3, 2015

@msteed Looks like @terminalmage took care of this.

@jfindlay jfindlay added Core relates to code central or existential to Salt Medium Change labels Jun 3, 2015
thatch45 added a commit that referenced this pull request Jun 4, 2015
Improve error message when module does not exist
@thatch45 thatch45 merged commit 72d2eae into saltstack:2015.5 Jun 4, 2015
@terminalmage terminalmage deleted the issue22958 branch August 18, 2015 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants