-
Notifications
You must be signed in to change notification settings - Fork 54
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
check for property access value of READ_WRITE on any platform #99
Conversation
Signed-off-by: Swapnil Wagh <waghswapnil@gmail.com>
@@ -751,6 +752,18 @@ def validate_property_value(mo, prop, value): | |||
return False | |||
|
|||
|
|||
def validate_property_access(mo, prop, platform=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate_property_access
-> is_writable_prop
platform) | ||
if prop_: | ||
access_list.append(prop_.access) | ||
return MoPropertyMeta.READ_WRITE in access_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the list is not required.. just return True in the loop and false outside of it.
@@ -181,7 +181,7 @@ def __set_prop(self, name, value, mark_dirty=True, forced=False): | |||
return | |||
if not forced: | |||
prop = imccoreutils.get_prop_meta(self, name) | |||
if prop.access != imccoremeta.MoPropertyMeta.READ_WRITE: | |||
if not imccoreutils.validate_property_access(self, name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name change.. as per above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take care of the comments.
Signed-off-by: Swapnil Wagh <waghswapnil@gmail.com>
Signed-off-by: Swapnil Wagh <waghswapnil@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Swapnil Wagh waghswapnil@gmail.com