Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
2d046e09
Commit
2d046e09
authored
Apr 22, 2021
by
Simon Spannagel
Browse files
Merge branch 'fix_porting_jobsub_python3' into 'master'
Finish porting jobsub to python3 See merge request
!417
parents
9fc01721
9773b941
Pipeline
#2525497
passed with stages
in 29 minutes and 5 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
jobsub/Colorer.py
View file @
2d046e09
...
...
@@ -90,7 +90,11 @@ def add_coloring_to_emit_ansi(fn):
color
=
'
\x1b
[35m'
# pink
else
:
color
=
'
\x1b
[0m'
# normal
args
[
1
].
msg
=
color
+
args
[
1
].
msg
+
'
\x1b
[0m'
# normal
if
type
(
args
[
1
].
msg
)
==
str
:
args
[
1
].
msg
=
color
+
args
[
1
].
msg
+
'
\x1b
[0m'
# normal
else
:
args
[
1
].
msg
=
color
+
(
args
[
1
].
msg
).
decode
(
'utf-8'
)
+
'
\x1b
[0m'
# normal
#print "after"
return
fn
(
*
args
)
return
new
...
...
jobsub/jobsub.py
View file @
2d046e09
...
...
@@ -265,22 +265,22 @@ def runCorryvreckan(filenamebase, jobtask, silent):
try
:
line
=
qout
.
get_nowait
()
# or q.get(timeout=.1)
if
not
silent
:
if
"
WARNING
"
in
line
.
strip
():
if
b
'
WARNING
'
in
line
.
strip
():
log
.
warning
(
line
.
strip
())
elif
"
ERROR
"
in
line
.
strip
():
elif
b
'
ERROR
'
in
line
.
strip
():
log
.
error
(
line
.
strip
())
elif
"
FATAL
"
in
line
.
strip
():
elif
b
'
FATAL
'
in
line
.
strip
():
log
.
critical
(
line
.
strip
())
else
:
log
.
info
(
line
.
strip
())
log_file
.
write
(
line
)
log_file
.
write
(
str
(
line
,
'utf-8'
)
)
except
Empty
:
pass
try
:
line
=
qerr
.
get_nowait
()
# or q.get(timeout=.1)
log
.
error
(
line
.
strip
())
log_file
.
write
(
line
)
log_file
.
write
(
str
(
line
,
'utf-8'
)
)
except
Empty
:
sleep
(
0.005
)
# sleep for 5 ms to avoid excessive CPU load
...
...
@@ -301,14 +301,14 @@ def runCorryvreckan(filenamebase, jobtask, silent):
log
.
critical
(
line
.
strip
())
else
:
log
.
info
(
line
.
strip
())
log_file
.
write
(
line
)
log_file
.
write
(
str
(
line
,
'utf-8'
)
)
except
Empty
:
pass
try
:
line
=
qerr
.
get_nowait
()
# or q.get(timeout=.1)
log
.
error
(
line
.
strip
())
log_file
.
write
(
line
)
log_file
.
write
(
str
(
line
,
'utf-8'
)
)
except
Empty
:
pass
finally
:
...
...
Write
Preview
Supports
Markdown
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