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
finesse
pykat
Commits
88de7f96
Commit
88de7f96
authored
Jan 16, 2014
by
Andreas Freise
Browse files
chaning error behaviour a little: if Finesse returns
an error I would prefer to just print that and exit(1).
parent
ee3f75be
Changes
1
Show whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
88de7f96
...
...
@@ -445,9 +445,6 @@ class kat(object):
cmd
.
append
(
katfile
.
name
)
#if self.verbose:
#print cmd
p
=
subprocess
.
Popen
(
cmd
,
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
err
=
""
...
...
@@ -455,14 +452,17 @@ class kat(object):
for
line
in
iter
(
p
.
stderr
.
readline
,
""
):
if
len
(
line
)
>
0
and
printerr
==
1
:
if
len
(
line
)
>
0
:
if
line
.
rstrip
().
endswith
(
'%'
):
vals
=
line
.
split
(
"-"
)
action
=
vals
[
0
].
strip
()
prc
=
vals
[
1
].
strip
()[:
-
1
]
if
printerr
==
1
:
sys
.
stdout
.
write
(
"
\r
{0} {1}%"
.
format
(
action
,
prc
))
elif
line
[
0
:
3
]
==
'** '
:
if
self
.
verbose
:
sys
.
stdout
.
write
(
line
)
else
:
err
+=
line
[
out
,
errpipe
]
=
p
.
communicate
()
if
printout
==
1
:
...
...
@@ -477,11 +477,10 @@ class kat(object):
r
.
runDateTime
=
datetime
.
datetime
.
now
()
# If Finesse returned an error, just print that and exit!
if
p
.
returncode
!=
0
:
raise
pkex
.
FinesseRunError
(
err
,
katfile
.
name
)
#if printout == 1: print out
#if printerr == 1: print err
print
err
sys
.
exit
(
1
)
root
=
os
.
path
.
splitext
(
katfile
.
name
)
base
=
os
.
path
.
basename
(
root
[
0
])
...
...
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