bcanvas/CanvasImportStore.py:importTextBuffer(): handle exceptions.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-14 11:52:24 +02:00
parent c049181ceb
commit 075bff0644

View File

@ -93,6 +93,7 @@ class CanvasImportStore():
# }}}
# {{{ importTextBuffer(self, inFile)
def importTextBuffer(self, inFile):
try:
inLine, outMap, outMaxCols = inFile.readline(), [], 0
while inLine:
inCellState, inCurCol, inCurColours, inMaxCol = self._CellState.CS_NONE, 0, (15, -1), len(inLine); outMap.append([]);
@ -134,6 +135,8 @@ class CanvasImportStore():
return (True, None)
else:
return (False, "empty output map")
except:
return (False, sys.exc_info()[1])
# }}}
# {{{ importTextFile(self, pathName)
def importTextFile(self, pathName):