这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@dalf
Copy link
Contributor

@dalf dalf commented Aug 16, 2021

What does this PR do?

required attributes: display a different message when the attribute has the wrong type

Why is this change important?

Tiny change, make #256 minor simple.

How to test this PR locally?

Author's checklist

Related issues

Related #256

required attributes: display a different message
when the attribute has the wrong type
Copy link
Member

@return42 return42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beside a nit this PR LGTM.

Comment on lines +74 to +75
'attribute "{0}" is of type {2}, must be of type {3}, cannot load plugin: {1}'
.format(plugin_attr, plugin, type_attr, plugin_attr_type)
Copy link
Member

@return42 return42 Aug 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think string replacement by log-function arguments *args consumes less resources when logging is disabled (since the formatted string it is late evaluated), while the format operation of the string is always executed, even if logging is disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, clearly.
sys.exit() just after "hides / solves" the issue.

@dalf dalf merged commit a925254 into searxng:master Aug 16, 2021
@dalf dalf deleted the plugin_minor_change branch August 16, 2021 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants