[CMF-checkins] SVN: CMF/branches/1.5/CMFCore/utils.py Display offending line when warning about product_name deprecation.

Florent Guillaume fg at nuxeo.com
Fri Jul 29 11:43:51 EDT 2005


Log message for revision 37543:
  Display offending line when warning about product_name deprecation.
  Remove duplicate import.
  

Changed:
  U   CMF/branches/1.5/CMFCore/utils.py

-=-
Modified: CMF/branches/1.5/CMFCore/utils.py
===================================================================
--- CMF/branches/1.5/CMFCore/utils.py	2005-07-29 15:42:09 UTC (rev 37542)
+++ CMF/branches/1.5/CMFCore/utils.py	2005-07-29 15:43:50 UTC (rev 37543)
@@ -49,7 +49,6 @@
 
 from exceptions import AccessControl_Unauthorized
 from exceptions import NotFound
-from warnings import warn
 
 security = ModuleSecurityInfo( 'Products.CMFCore.utils' )
 
@@ -424,7 +423,7 @@
         if product_name is not None:
             warn("The product_name parameter of ToolInit is deprecated and "
                  "will be ignored in CMF1.6: %s" % product_name,
-                 DeprecationWarning)
+                 DeprecationWarning, stacklevel=2)
         self.product_name = product_name
         self.icon = icon
 



More information about the CMF-checkins mailing list