diff Python/sysmodule.c @ 46573:aef3501d8e77 legacy-trunk

Use PyErr_WarnPy3k throughout
author Benjamin Peterson <benjamin@python.org>
date Sun, 27 Apr 2008 03:01:45 +0000
parents fb8d3e1f6161
children 7670005da8c5
line wrap: on
line diff
--- a/Python/sysmodule.c	Sun Apr 27 02:28:02 2008 +0000
+++ b/Python/sysmodule.c	Sun Apr 27 03:01:45 2008 +0000
@@ -172,10 +172,8 @@
 	PyThreadState *tstate;
 	PyObject *tmp_type, *tmp_value, *tmp_tb;
 
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning,
-		       "sys.exc_clear() not supported in 3.x; "
-		       "use except clauses") < 0)
+	if (PyErr_WarnPy3k("sys.exc_clear() not supported in 3.x; "
+		       "use except clauses", 1) < 0)
 		return NULL;
 
 	tstate = PyThreadState_GET();