[Inteproxy-commits] r330 - in branches/streaming: . inteproxy

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 3 17:19:51 CET 2012


Author: teichmann
Date: 2012-01-03 17:19:50 +0100 (Tue, 03 Jan 2012)
New Revision: 330

Modified:
   branches/streaming/ChangeLog
   branches/streaming/inteproxy/transcoder.py
Log:
Added doc strings to transcoder.

Modified: branches/streaming/ChangeLog
===================================================================
--- branches/streaming/ChangeLog	2012-01-03 16:07:03 UTC (rev 329)
+++ branches/streaming/ChangeLog	2012-01-03 16:19:50 UTC (rev 330)
@@ -1,6 +1,7 @@
 2012-01-03	Sascha L. Teichmann	<sascha.teichmann at intevation.de>
 
-	* inteproxy/chunkedwriter.py: Added doc strings.
+	* inteproxy/chunkedwriter.py, inteproxy/transcoder.py:
+	  Added doc strings.
 
 2012-01-02	Sascha L. Teichmann	<sascha.teichmann at intevation.de>
 

Modified: branches/streaming/inteproxy/transcoder.py
===================================================================
--- branches/streaming/inteproxy/transcoder.py	2012-01-03 16:07:03 UTC (rev 329)
+++ branches/streaming/inteproxy/transcoder.py	2012-01-03 16:19:50 UTC (rev 330)
@@ -285,20 +285,28 @@
                                 rule)
 
     def build_url_patterns(self):
-        """TODO: Document me!"""
+        """Builds a list of regex patterns using the 
+        hosts and pathes from the rules.
+        """
 
         return ["%s%s" % (host_regex.pattern, path_regex.pattern)
                 for host_regex, path_regex, classname in self.rules]
 
     def build_url_regex(self):
-        """TODO: Document me!"""
+        """Glues together the single url patterns into a large regex
+        prefixed by http:// or https://.
+        """
 
         return ("(?:http|https)://(?:%s)" %
                 "|".join("(" + pattern + ")"
                          for pattern in self.build_url_patterns()))
-        
+
     def url_rewriter(self, prefix, log_debug):
-        """TODO: Document me!"""
+        """Compiles the url regexes to be used more than once.
+        Returns a funtion which takes as a single argument the
+        byte data to apply the url rewriting on. This function
+        returns the rewritten data.
+        """
 
         pattern = re.compile(self.build_url_regex())
 



More information about the Inteproxy-commits mailing list