[Zope3-dev] Q on conf error reporting

Dave Harris dpharris76 at msn.com
Sun Feb 8 14:57:15 EST 2004


I added an server entry to zope.conf using a silly type:

<server>
  type LEMMING
  address 8083
</server>

and received (deservedly) a program failure marking my misdeed:

Traceback (most recent call last):
  File "z3.py", line 65, in ?
    run()
  File "z3.py", line 61, in run
    main(argv[1:])
  File "C:\rascal\dev\Z3SB\src\zope\app\process\main.py", line 56, in main
    setup(args)
  File "C:\rascal\dev\Z3SB\src\zope\app\process\main.py", line 99, in setup
    server.create(task_dispatcher, db)
  File "C:\rascal\dev\Z3SB\src\zope\app\process\server.py", line 42, in 
create
    servertype.create(task_dispatcher, database,
AttributeError: 'NoneType' object has no attribute 'create'

This leads to a couple (or four) questions:

1) When getServerType() returns None, should create() still proceed with the 
servertype.create() call?

2) When a bad but well-formed configuration entry is processed, should Zope 
3 report the specifics (e.g. the config file line and the reason for 
failure)?

3) In general, should Zope 3 disguise the fact that Python is the 
implementation language - that is, not generate tracebacks?

4) Would a test for this situation be a unit test of 
zope.app.process.setup()? Or would it be considered a functional test?

Thanks,
Dave Harris 



More information about the Zope3-dev mailing list