changeset 606:ab8ab275dbd2

Removed some old debug output.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 25 Mar 2008 15:08:22 +0100
parents 05c7f58fae6e
children 626cd75d75fb
files viff/runtime.py
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Tue Mar 25 15:05:55 2008 +0100
+++ b/viff/runtime.py	Tue Mar 25 15:08:22 2008 +0100
@@ -41,7 +41,7 @@
 from viff import shamir
 from viff.prss import prss
 from viff.field import GF256, FieldElement
-from viff.util import println, wrapper
+from viff.util import wrapper
 
 from twisted.internet import reactor
 from twisted.internet.defer import Deferred, DeferredList
@@ -269,12 +269,10 @@
         self.program_counter = [0]
 
     def connectionMade(self):
-        #print "Transport:", self.transport
         self.sendString(str(self.factory.runtime.id))
         try:
             self.peer_cert = self.transport.socket.peer_certificate
         except AttributeError:
-            #print "No certificate in session"
             self.peer_cert = None
 
     def stringReceived(self, string):
@@ -367,7 +365,6 @@
             for protocol in self.protocols.itervalues():
                 protocol.program_counter[-1] += 1
                 protocol.program_counter.append(0)
-            #println("Calling %s: %s", method.func_name, self.program_counter)
             return method(self, *args, **kwargs)
         finally:
             for protocol in self.protocols.itervalues():
@@ -465,7 +462,7 @@
         """
 
         def stop(_):
-            println("Initiating shutdown sequence.")
+            print "Initiating shutdown sequence."
             for protocol in self.protocols.itervalues():
                 protocol.loseConnection()
             reactor.stop()
@@ -516,7 +513,6 @@
                 protocol.program_counter = pc
 
         saved_pcs = get_pcs()
-        #println("Saved PC: %s for %s", saved_pc, func.func_name)
 
         @wrapper(func)
         def callback_wrapper(*args, **kwargs):
@@ -524,12 +520,10 @@
             try:
                 current_pcs = get_pcs()
                 set_pcs(saved_pcs)
-                #println("Callback PC: %s", self.program_counter)
                 return func(*args, **kwargs)
             finally:
                 set_pcs(current_pcs)
 
-        #println("Adding %s to %s", func.func_name, deferred)
         deferred.addCallback(callback_wrapper, *args, **kwargs)
 
     @increment_pc
@@ -856,7 +850,6 @@
         Returns a list of (id, share) pairs.
         """
         shares = shamir.share(number, self.threshold, self.num_players)
-        #println("Shares of %s: %s", number, shares)
 
         result = []
         for peer_id, share in shares:
@@ -1113,7 +1106,7 @@
 
     for peer_id, player in players.iteritems():
         if peer_id > id:
-            println("Will connect to %s", player)
+            print "Will connect to %s" % player
             if options and options.tls:
                 reactor.connectTLS(player.host, player.port, factory, cred)
             else: