Skip to content

Fixed bug with device_wrapping.DeviceWrappingPlug where the attributes were sometimes not set.#908

Merged
arsharma1 merged 1 commit intogoogle:masterfrom
dieppedalle:master
Jan 14, 2020
Merged

Fixed bug with device_wrapping.DeviceWrappingPlug where the attributes were sometimes not set.#908
arsharma1 merged 1 commit intogoogle:masterfrom
dieppedalle:master

Conversation

@dieppedalle
Copy link
Copy Markdown
Contributor

@dieppedalle dieppedalle commented Jan 14, 2020

What I did

Setting the attribute of device_wrapping.DeviceWrappingPlug now has two expected behavior:
First:
-If we are setting the _device, then set the attribute from DeviceWrappingPlug (because we are probably calling this setter from the initializer).
-If _device has not been defined then set the attribute in DeviceWrappingPlug.
-If the attribute has already been defined in DeviceWrappingPlug then set that variable.
Otherwise:
-Set the attribute in the _device object.

Why I did it

The device_wrapping.DeviceWrappingPlug didn't set the attributes correctly based on when the super initializer from the children class is being called.


This change is Reviewable

@arsharma1 arsharma1 merged commit 3162e42 into google:master Jan 14, 2020
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