From 6fad360ede056a9ef5dbb86cd60fe713af528b3c Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Sat, 16 Jul 2022 22:11:28 +0100 Subject: [PATCH] add error message in subject --- vmcompact/subject.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vmcompact/subject.py b/vmcompact/subject.py index 2aadf6f..0c7283d 100644 --- a/vmcompact/subject.py +++ b/vmcompact/subject.py @@ -12,25 +12,25 @@ class Subject: [o.on_update(modifier) for o in self._observers] def add(self, observer): - """adds an observer to observables""" + """adds an observer to _observers""" if observer not in self._observers: self._observers.append(observer) def remove(self, observer): - """removes an observer from observables""" + """removes an observer from _observers""" try: self._observers.remove(observer) except ValueError: - pass + print(f"{observer} not in observers (ungridded)") def get(self) -> list: - """returns the current observables""" + """returns the current _observers""" return self._observers def clear(self): - """clears the observables list""" + """clears the _observers list""" self._observers.clear()