Salome HOME
projects
/
modules
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6b4aaf
)
Fix bug with Python warning messages not redirected when sys.stderr is redirected
author
Renaud Barate
<renaud.barate@edf.fr>
Tue, 8 Jul 2014 14:48:00 +0000
(16:48 +0200)
committer
Renaud Barate
<renaud.barate@edf.fr>
Tue, 8 Jul 2014 14:48:00 +0000
(16:48 +0200)
src/KERNEL_PY/kernel/deprecation.py
patch
|
blob
|
history
diff --git
a/src/KERNEL_PY/kernel/deprecation.py
b/src/KERNEL_PY/kernel/deprecation.py
index 588b4162566975eba2fa75123a91ddf0b39d2787..ebd1b30021691ae346d97bb2b9753e0b7399c435 100644
(file)
--- a/
src/KERNEL_PY/kernel/deprecation.py
+++ b/
src/KERNEL_PY/kernel/deprecation.py
@@
-149,7
+149,9
@@
def is_called_by_sphinx():
def __show_colored_warning(message, category, filename,
- lineno, file = sys.stderr, line = None):
+ lineno, file = None, line = None):
+ if file is None:
+ file = sys.stderr
str = warnings.formatwarning(message, category, filename, lineno, line)
if category == DeprecationWarning and termcolor.canDisplayColor(file):
file.write(termcolor.makeColoredMessage(str, termcolor.BLUE))