This commit is contained in:
Chrys 2019-11-04 22:31:36 +01:00
parent bed06374f1
commit 6761b6267c
2 changed files with 44 additions and 38 deletions

View File

@ -61,6 +61,7 @@ class attributeManager():
def setAttributes(self, currAttributes):
self.prevAttributes = self.currAttributes
self.currAttributes = currAttributes.copy()
def getAttributeByXY(self, x, y):
if not self.currAttributes:
return None

View File

@ -212,9 +212,14 @@ class driver(screenDriver):
},
'screen': screen,
'screenUpdateTime': time.time(),
'text': '',
'attributes': [],
}
eventData['text'], eventData['attributes'] =\
self.autoDecodeVCSA(vcsaContent[4:], eventData['lines'], eventData['columns'])
try:
eventData['text'], eventData['attributes'] =\
self.autoDecodeVCSA(vcsaContent[4:], eventData['lines'], eventData['columns'])
except:
pass
# VCSU seems to give b' ' instead of b'\x00\x00\x00' (tsp), deactivated until its fixed
if vcsuContent != None:
try: