opensubscriber
   Find in this group all groups
 
Unknown more information…

g : gnunet-svn@gnu.org 26 March 2012 • 5:39AM -0400

[GNUnet-SVN] r20757 - gnunet/src/gns/proxy
by gnunet

REPLY TO AUTHOR
 
REPLY TO GROUP




Author: schanzen
Date: 2012-03-25 23:39:45 +0200 (Sun, 25 Mar 2012)
New Revision: 20757

Modified:
   gnunet/src/gns/proxy/proxy.py
Log:
-first zkey then .+, catch exception for they are not critical


Modified: gnunet/src/gns/proxy/proxy.py
===================================================================
--- gnunet/src/gns/proxy/proxy.py 2012-03-25 21:35:35 UTC (rev 20756)
+++ gnunet/src/gns/proxy/proxy.py 2012-03-25 21:39:45 UTC (rev 20757)
@@ -138,16 +138,20 @@
                         out = soc
                     data = i.recv(8192)
                     if data:
-                        if (re.match("(\w+\.)*gnunet", self.host_port[0])):
-                            arr = self.host_port[0].split('.')
-                            arr.pop(0)
-                            data = re.sub('(a href="http://(\w+\.)*)(\+)',
-                                self.replace_and_shorten(to_repl), data)
-                        data = re.sub('(a href="http://(\w+\.)*zkey)',
-                            self.shorten_zkey(), data)
-                        #print data
-                        out.send(data)
-                        count = 0
+                        try:
+                          data = re.sub('(a href="http://(\w+\.)*zkey)',
+                              self.shorten_zkey(), data)
+                          if (re.match("(\w+\.)*gnunet", self.host_port[0])):
+                              arr = self.host_port[0].split('.')
+                              arr.pop(0)
+                              data = re.sub('(a href="http://(\w+\.)*)(\+)',
+                                  self.replace_and_shorten(to_repl), data)
+                          #print data
+                          out.send(data)
+                          count = 0
+                        except:
+                          print "GNS exception:", sys.exc_info()[0]
+
             else:
                 print "\t" "idle", count
                 print msg


_______________________________________________
GNUnet-SVN mailing list
GNUnet-SVN@gnu....
https://lists.gnu.org/mailman/listinfo/gnunet-svn

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.