[tor-commits] [bridgedb/develop] Split a long string of chained method calls into separate calls.

isis at torproject.org isis at torproject.org
Sat Feb 1 23:57:39 UTC 2014


commit 847905a78373aa101406439ccaa68f2f3e9a6c9a
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Jan 25 18:19:31 2014 +0000

    Split a long string of chained method calls into separate calls.
    
     * CHANGE a line in HTTPServer.CaptchaProtectedResource which chained
       several method calls together inside a return statement, into a
       separate lines for each call.
---
 lib/bridgedb/HTTPServer.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 6892f12..da72f3e 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -98,7 +98,9 @@ class CaptchaProtectedResource(twisted.web.resource.Resource):
 
         # TODO: this does not work for versions of IE < 8.0
         imgstr = 'data:image/jpeg;base64,%s' % base64.b64encode(c.image)
-        return lookup.get_template('captcha.html').render(imgstr=imgstr, challenge_field=c.challenge)
+        template = lookup.get_template('captcha.html')
+        rendered = template.render(imgstr=imgstr, challenge_field=c.challenge)
+        return rendered
 
     def render_POST(self, request):
         try:





More information about the tor-commits mailing list