From fe7e97e68a4f40163201ce11fbe68fddd1629d15 Mon Sep 17 00:00:00 2001 From: TheYOSH Date: Sun, 27 Jan 2019 16:36:06 +0100 Subject: [PATCH] Remove unused clear functions. #193 --- terrariumDisplay.py | 10 +++++----- terrariumNotification.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/terrariumDisplay.py b/terrariumDisplay.py index de389eeef..e96940353 100644 --- a/terrariumDisplay.py +++ b/terrariumDisplay.py @@ -365,12 +365,12 @@ def set_address(self,address): print('%s - WARNING - terrariumDisplay - %s' % (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S,%f')[:23],ex)) self.device = None - def clear(self): - if self.device is None: - return + #def clear(self): + # if self.device is None: + # return - self.device.write(str.encode('00clr')) - sleep(1) + # self.device.write(str.encode('00clr')) + # sleep(1) def display_message(self,text_lines): if self.device is None or self.animating: diff --git a/terrariumNotification.py b/terrariumNotification.py index c3245776c..2019cf2c4 100644 --- a/terrariumNotification.py +++ b/terrariumNotification.py @@ -604,7 +604,7 @@ def set_display(self,address,hardwaretype,title): print(ex) self.display = None - if self.__profile_image is not None: + if self.__profile_image is not None and self.display is not None: self.display.write_image(self.__profile_image) def send_display(self,message):