diff options
| author | Tait Berlette <54515877+taitberlette@users.noreply.github.com> | 2021-03-31 19:24:34 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-06-03 20:45:24 (GMT) |
| commit | 1115ac2fff0057df93ea8a6ccdb93102cec0c465 (patch) | |
| tree | 8c06cc71dbdb0783e5ac59b79ae090c445ec8a95 | |
| parent | 9ded8e28a69df48fe02e82caed7cd48e4be02b8d (diff) | |
MemoryError exception now shows custom message instead of CrashApp.
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
| -rw-r--r-- | wasp/wasp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wasp/wasp.py b/wasp/wasp.py index 5b1a8b8..6c3e4ef 100644 --- a/wasp/wasp.py +++ b/wasp/wasp.py @@ -507,6 +507,8 @@ class Manager(): self._tick() except KeyboardInterrupt: raise + except MemoryError: + self.switch(PagerApp("Your watch is low on memory.\n\nYou may want to reboot.")) except Exception as e: # Only print the exception if the watch provides a way to do so! if 'print_exception' in dir(watch): @@ -523,6 +525,8 @@ class Manager(): self._scheduled = False try: self._tick() + except MemoryError: + self.switch(PagerApp("Your watch is low on memory.\n\nYou may want to reboot.")) except Exception as e: # Only print the exception if the watch provides a way to do so! if 'print_exception' in dir(watch): |
