Mercurial > code > home > repos > homeauto
changeset 350:a380561fd8a8
add setToGraph
Ignore-this: f1e1b6f7604ac19f73cb7622b6aa80fc
author | drewp@bigasterisk.com |
---|---|
date | Mon, 16 Apr 2018 22:18:49 -0700 |
parents | 88bd46f4e28c |
children | 7716b1810d6c |
files | lib/patchablegraph.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/patchablegraph.py Mon Apr 16 22:16:15 2018 -0700 +++ b/lib/patchablegraph.py Mon Apr 16 22:18:49 2018 -0700 @@ -107,6 +107,9 @@ self._observers.remove(onPatch) except ValueError: pass + + def setToGraph(self, newGraph): + self.patch(Patch.fromDiff(self._graph, newGraph)) class CycloneGraphHandler(PrettyErrorHandler, cyclone.web.RequestHandler):