black screen fix

This commit is contained in:
Neythen Treloar 2022-04-07 18:37:29 +01:00
commit 1e7dca59f2

View File

@ -972,6 +972,7 @@ class StockTicker():
image_list.append(self.blank) image_list.append(self.blank)
except Exception as e: except Exception as e:
logf = open('log.txt', "a") logf = open('log.txt', "a")
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
@ -982,6 +983,7 @@ class StockTicker():
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]))) logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
logf.close() logf.close()
finalDisplayImage = self.stitchImage(image_list) finalDisplayImage = self.stitchImage(image_list)
return finalDisplayImage return finalDisplayImage
@ -1305,6 +1307,7 @@ class StockTicker():
image_list.append(self.blank) image_list.append(self.blank)
except Exception as e: except Exception as e:
logf = open('log.txt', "a") logf = open('log.txt', "a")
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
@ -1316,6 +1319,7 @@ class StockTicker():
logf.close() logf.close()
finalDisplayImage = self.stitchImage(image_list) finalDisplayImage = self.stitchImage(image_list)
@ -2801,6 +2805,7 @@ if __name__ == '__main__':
stock_ticker = StockTicker() stock_ticker = StockTicker()
stock_ticker.process_msg('A') stock_ticker.process_msg('A')
while True: while True:
msg = getInput() msg = getInput()
stock_ticker.process_msg(msg) stock_ticker.process_msg(msg)
@ -2818,3 +2823,4 @@ if __name__ == '__main__':