Update driver. :param newstate: a dictionary containing the new driver state. :type newstate: dict. :param force: apply change even when the cache says it is not necessary. :param force: boolean. :raises: ValueError if called with an empty dictionary.
(self, newstate=None, *, force=False, **kwargs)
| 363 | pass |
| 364 | |
| 365 | def update(self, newstate=None, *, force=False, **kwargs): |
| 366 | """Update driver. |
| 367 | |
| 368 | :param newstate: a dictionary containing the new driver state. |
| 369 | :type newstate: dict. |
| 370 | :param force: apply change even when the cache says it is not necessary. |
| 371 | :param force: boolean. |
| 372 | |
| 373 | :raises: ValueError if called with an empty dictionary. |
| 374 | """ |
| 375 | |
| 376 | newstate = _merge_dicts(newstate, kwargs) |
| 377 | if not newstate: |
| 378 | raise ValueError("update() called with an empty dictionary") |
| 379 | |
| 380 | for key, value in newstate.items(): |
| 381 | self._lantz_features[key].set(self, value, force) |
| 382 | |
| 383 | def update_async(self, newstate=None, *, force=False, callback=None, **kwargs): |
| 384 | """Asynchronous update driver. |