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

Parse default args configuration #471

Merged
merged 4 commits into from
May 29, 2018

Conversation

JeffreyDevloo
Copy link
Contributor

No description provided.

from ovs.extensions.healthcheck.logger import Logger
from ovs.extensions.generic.configuration import Configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

...f G H i...

@@ -536,11 +569,16 @@ def get_command(self, ctx, name):
:return: Function pointer to the command or None when no import could happen
:rtype: callable
"""
cmd = self.commands.get(name)
Copy link
Contributor

Choose a reason for hiding this comment

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

cmd = self.commands.get(name)
    if cmd: return cmd 

returns quite a couple of times.
Have you thought about ofloading it to a seperate function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Offloading won't really benefit it here

def get_possible_cached_command():
     return self.commands.get(name)

cmd = self.get_possible_cached_command()
if cmd:
  ....

@JeffreyDevloo JeffreyDevloo merged commit dbba883 into develop May 29, 2018
@JeffreyDevloo JeffreyDevloo deleted the parse_default_args_configuration branch May 29, 2018 12:59
JeffreyDevloo added a commit that referenced this pull request May 29, 2018
…ation

Parse default args configuration
(cherry picked from commit dbba883)
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