[Zope3-checkins] SVN: Zope3/trunk/ More or less fixed the static
apidoc generator. Added an workaround to avoid the use of the
PublisherBrowser.
Florian Lindner
Florian.Lindner at xgm.de
Sun Sep 10 09:46:17 EDT 2006
Log message for revision 70095:
More or less fixed the static apidoc generator. Added an workaround to avoid the use of the PublisherBrowser.
Changed:
U Zope3/trunk/doc/CHANGES.txt
U Zope3/trunk/src/zope/app/apidoc/static.py
-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2006-09-10 13:46:02 UTC (rev 70094)
+++ Zope3/trunk/doc/CHANGES.txt 2006-09-10 13:46:17 UTC (rev 70095)
@@ -41,6 +41,8 @@
Bug fixes
+ - More or less fixed the static apidoc generator. (fix + workaround).
+
- Fixed issue 705, double URL unquoting of GET parameters in
functional tests.
Modified: Zope3/trunk/src/zope/app/apidoc/static.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/static.py 2006-09-10 13:46:02 UTC (rev 70094)
+++ Zope3/trunk/src/zope/app/apidoc/static.py 2006-09-10 13:46:17 UTC (rev 70095)
@@ -188,17 +188,20 @@
if not os.path.exists(self.rootDir):
os.mkdir(self.rootDir)
-
- if self.options.use_publisher:
- self.browser = PublisherBrowser()
-
+
if self.options.use_webserver:
self.browser = OnlineBrowser()
-
+ elif self.options.use_publisher:
+ # PublisherBrowser does not work at the moment, so complain if is has been selected.
+ #self.browser = PublisherBrowser()
+ self.sendMessage("PublisherBrowser is broken. Please use OnlineBrowser instead.")
+ return
+
self.browser.setUserAndPassword(self.options.username,
self.options.password)
- self.browser._links_factory.urltags = urltags
+ self.browser._links_factory = mechanize.LinksFactory(urltags=urltags)
+
if self.options.debug:
self.browser.addheaders.append(('X-zope-handle-errors', False))
@@ -261,7 +264,7 @@
'%s (%i): %s' % (error.msg, error.code, link.callableURL), 2)
self.sendMessage('+-> Reference: ' + link.referenceURL, 2)
# Now set the error page as the response
- from ClientCookie._Util import response_seek_wrapper
+ from mechanize import response_seek_wrapper
self.browser._response = response_seek_wrapper(error)
except (urllib2.URLError, ValueError):
# We had a bad URL running the publisher browser
More information about the Zope3-Checkins
mailing list