]> granicus.if.org Git - python/commitdiff
[Patch #679505] Trigger DeprecationWarning on importing the rotor module
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 24 Apr 2003 13:17:13 +0000 (13:17 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 24 Apr 2003 13:17:13 +0000 (13:17 +0000)
Modules/rotormodule.c

index dcca0c6174e2aa91437b3a6264e4fc754e374b3b..6759244efaf6ca55f72557a285519f80197acd99 100644 (file)
@@ -620,4 +620,8 @@ initrotor(void)
 {
        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;
 }