Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

fromClient() function for passwordBone and some code refactoring #52

Merged
merged 3 commits into from
Apr 13, 2018

Conversation

phorward
Copy link
Member

@phorward phorward commented Apr 4, 2018

Hi, this is a small enhancement for the passwordBone, including some code refactoring.

@tsteinruecken tsteinruecken self-assigned this Apr 4, 2018
return False

def fromClient( self, valuesCache, name, data ):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can simplify that. Check for "not value" first (and return "No value entered" directly), and then test for isInvalid (return err) else store value.
With the current code, err is always False if no value is set; so the expression "not value and not err" can be shortened

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, I've fixed it now and hope this fits your recommendations.

@tsteinruecken tsteinruecken merged commit 0efb75c into develop Apr 13, 2018
@sveneberth sveneberth deleted the refactor_passwordBone branch March 28, 2019 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants