Update vcsaDriver.py
This commit is contained in:
parent
e4b132fd66
commit
8f60c1777e
@ -165,7 +165,12 @@ class driver():
|
|||||||
self.env['runtime']['debug'].writeDebugOut('VCSA:updateWatchdog:' + str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut('VCSA:updateWatchdog:' + str(e),debug.debugLevel.ERROR)
|
||||||
|
|
||||||
def updateCharMap(self, screen):
|
def updateCharMap(self, screen):
|
||||||
tty = open('/dev/tty' + screen, 'rb')
|
self.charmap = {}
|
||||||
|
try:
|
||||||
|
tty = open('/dev/tty' + screen, 'rb')
|
||||||
|
except Exception as e:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:' + str(e),debug.debugLevel.ERROR)
|
||||||
|
return
|
||||||
GIO_UNIMAP = 0x4B66
|
GIO_UNIMAP = 0x4B66
|
||||||
VT_GETHIFONTMASK = 0x560D
|
VT_GETHIFONTMASK = 0x560D
|
||||||
himask = array("H", (0,))
|
himask = array("H", (0,))
|
||||||
@ -179,9 +184,10 @@ class driver():
|
|||||||
unimapdesc = array("B", pack("@HP", sz, unipairs.buffer_info()[0]))
|
unimapdesc = array("B", pack("@HP", sz, unipairs.buffer_info()[0]))
|
||||||
ioctl(tty.fileno(), GIO_UNIMAP, unimapdesc)
|
ioctl(tty.fileno(), GIO_UNIMAP, unimapdesc)
|
||||||
break
|
break
|
||||||
except IOError as e:
|
except Exception as e:
|
||||||
if e.errno != errno.ENOMEM:
|
tty.close()
|
||||||
raise
|
self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:' + str(e),debug.debugLevel.ERROR)
|
||||||
|
return
|
||||||
sz *= 2
|
sz *= 2
|
||||||
tty.close()
|
tty.close()
|
||||||
ncodes, = unpack_from("@H", unimapdesc)
|
ncodes, = unpack_from("@H", unimapdesc)
|
||||||
|
Loading…
Reference in New Issue
Block a user