Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Steinlechner
pykat
Commits
8fdb337c
Commit
8fdb337c
authored
Dec 17, 2013
by
Andreas Freise
Browse files
fixing problems with Block reading/writing.
parent
464d25cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
pykat/exceptions.py
View file @
8fdb337c
...
...
@@ -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))
pykat/finesse.py
View file @
8fdb337c
...
...
@@ -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
...
...
@@ -577,8 +577,9 @@ class kat(object):
for
key
in
self
.
__blocks
:
objs
=
self
.
__blocks
[
key
].
contents
out
.
append
(
"%%% FTblock "
+
key
+
"
\n
"
)
if
key
!=
NO_BLOCK
:
out
.
append
(
"%%% FTblock "
+
key
+
"
\n
"
)
for
obj
in
objs
:
if
isinstance
(
obj
,
str
):
...
...
@@ -593,8 +594,9 @@ class kat(object):
out
.
append
(
t
+
"
\n
"
)
else
:
out
.
append
(
txt
+
"
\n
"
)
out
.
append
(
"%%% FTend "
+
key
+
"
\n
"
)
if
key
!=
NO_BLOCK
:
out
.
append
(
"%%% FTend "
+
key
+
"
\n
"
)
if
self
.
noxaxis
!=
None
and
self
.
noxaxis
==
True
:
out
.
append
(
"noxaxis
\n
"
)
...
...
pykat/param.py
View file @
8fdb337c
...
...
@@ -164,4 +164,4 @@ class AttrParam(Param):
rtn
.
extend
(
super
(
AttrParam
,
self
).
getFinesseText
())
return
rtn
\ No newline at end of file
return
rtn
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment