##// END OF EJS Templates
Carrefully separate warnings.warn and warn in IPython/utils/warn.py
Pierre Gerold -
Show More
@@ -12,9 +12,9 b' import sys'
12 12
13 13 from IPython.utils import io
14 14
15 from warnings import warn
15 import warnings
16 16
17 warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning)
17 warnings.warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning)
18 18
19 19 def warn(msg,level=2,exit_val=1):
20 20 """Standard warning printer. Gives formatting consistency.
@@ -33,7 +33,7 b' def warn(msg,level=2,exit_val=1):'
33 33 -exit_val (1): exit value returned by sys.exit() for a level 4
34 34 warning. Ignored for all other levels."""
35 35
36 warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning)
36 warnings.warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning)
37 37 if level>0:
38 38 header = ['','','WARNING: ','ERROR: ','FATAL ERROR: ']
39 39 print(header[level], msg, sep='', file=io.stderr)
General Comments 0
You need to be logged in to leave comments. Login now