mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-26 08:56:36 +00:00
bcanvas/CanvasImportStore.py:importTextBuffer(): handle exceptions.
This commit is contained in:
parent
f6afcd735a
commit
1d927bf2b9
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user