[Python-checkins] python/dist/src/Modules rotormodule.c,2.37,2.38

akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Thu, 24 Apr 2003 06:17:16 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv5029

Modified Files:
	rotormodule.c 
Log Message:
[Patch #679505] Trigger DeprecationWarning on importing the rotor module

Index: rotormodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v
retrieving revision 2.37
retrieving revision 2.38
diff -C2 -d -r2.37 -r2.38
*** rotormodule.c	2 Aug 2002 02:27:13 -0000	2.37
--- rotormodule.c	24 Apr 2003 13:17:13 -0000	2.38
***************
*** 621,623 ****
--- 621,627 ----
  	Rotor_Type.ob_type = &PyType_Type;
  	(void)Py_InitModule("rotor", rotor_methods);
+ 	if (PyErr_Warn(PyExc_DeprecationWarning,
+ 		       "the rotor module uses an insecure algorithm "
+                        "and is deprecated") < 0)
+ 		return;
  }