mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-16 12:36:38 +00:00
bcanvas/CanvasImportStore.py:importTextBuffer(): handle exceptions.
This commit is contained in:
parent
c049181ceb
commit
075bff0644
@ -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