Skip to content
Snippets Groups Projects
Commit 8fdb337c authored by Andreas Freise's avatar Andreas Freise
Browse files

fixing problems with Block reading/writing.

parent 464d25cc
No related branches found
No related tags found
No related merge requests found
......@@ -26,5 +26,6 @@ class FinesseRunError(BasePyKatException) :
self.__err = err
self.__kat = kat
BasePyKatException.__init__(self, "Finesse returned an error running {1}: {0}".format(self.__err, self.__kat))
BasePyKatException.__init__(self, "Finesse error (file {1}):\n{0}".format(self.__err, self.__kat))
#BasePyKatException.__init__(self, "{0}".format(self.__err))
......@@ -225,7 +225,7 @@ class kat(object):
warnings.warn("found block {0} before block {1} ended".format(newTag, self.__currentTag))
if newTag in self.__blocks:
raise pkex.BasePyKatException("Block `{0}` has already been read")
raise pkex.BasePyKatException("Block `{0}` has already been read").format(newTag)
self.__blocks[newTag] = Block(newTag) # create new list to store all references to components in block
self.__currentTag = newTag
......@@ -578,6 +578,7 @@ class kat(object):
for key in self.__blocks:
objs = self.__blocks[key].contents
if key != NO_BLOCK:
out.append("%%% FTblock " + key + "\n")
for obj in objs:
......@@ -594,6 +595,7 @@ class kat(object):
else:
out.append(txt + "\n")
if key != NO_BLOCK:
out.append("%%% FTend " + key + "\n")
if self.noxaxis != None and self.noxaxis == True:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment