zope.testbrowser fails badly when calling .contents on a new Browser instance
Bug #419119 reported by
Valentin Lab
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Fix Released
|
Undecided
|
Wolfgang Schnerring | ||
zope.testbrowser |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On a new instance of Browser (of zope.testbrowser), asking contents before open()ing an URL fails badly:
>>> browser = Browser()
>>> browser.contents
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute 'tell'
The exception is not very clear, and it might not be the correct way to handle this case. Mechanize answers with "None".
We should just avoid trying to get further if we receive None and return None also.
I've joined a patch with a test.
Changed in zope3: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
forgot the bug URL in the comments of the last patch