[py-svn] r37203 - py/dist/py/doc

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Jan 23 16:29:55 CET 2007


Author: cfbolz
Date: Tue Jan 23 16:29:54 2007
New Revision: 37203

Modified:
   py/dist/py/doc/confrest.py
Log:
factor the content-getting out into a method (so I can override it in a
slightly hackish way somewhere else).


Modified: py/dist/py/doc/confrest.py
==============================================================================
--- py/dist/py/doc/confrest.py	(original)
+++ py/dist/py/doc/confrest.py	Tue Jan 23 16:29:54 2007
@@ -90,9 +90,13 @@
                             href="http://codespeak.net"))
     Page = PyPage 
 
+
+    def get_content(self, txtpath, encoding):
+        return unicode(txtpath.read(), encoding)
+
     def process(self, txtpath): 
         encoding = self.encoding
-        content = unicode(txtpath.read(), encoding)
+        content = self.get_content(txtpath, encoding)
         stylesheet = self.stylesheet 
         if not stylesheet.startswith('http') and \
            not txtpath.dirpath(stylesheet).check(): 


More information about the py-svn mailing list