[Zope-Checkins] CVS: Packages/OFS - Application.py:1.154.2.4
Evan Simpson
evan@zope.com
Fri, 12 Oct 2001 09:36:42 -0400
Update of /cvs-repository/Packages/OFS
In directory cvs.zope.org:/tmp/cvs-serv23295
Modified Files:
Tag: Zope-2_4-branch
Application.py
Log Message:
Emit a warning when duplicate Product names are found during import.
=== Packages/OFS/Application.py 1.154.2.3 => 1.154.2.4 ===
for priority, product_name, index, product_dir in products:
- if done.has_key(product_name): continue
- done[product_name]=1
+ if done.has_key(product_name):
+ LOG('OFS.Application', WARNING, 'Duplicate Product name',
+ 'After loading Product %s from %s,\n'
+ 'I skipped the one in %s.\n' % (
+ `product_name`, `done[product_name]`, `product_dir`) )
+ continue
+ done[product_name]=product_dir
import_product(product_dir, product_name)
def import_product(product_dir, product_name, raise_exc=0, log_exc=1):