viff

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 diff
     1.1 --- a/viff/runtime.py	Tue Mar 25 15:05:55 2008 +0100
     1.2 +++ b/viff/runtime.py	Tue Mar 25 15:08:22 2008 +0100
     1.3 @@ -41,7 +41,7 @@
     1.4  from viff import shamir
     1.5  from viff.prss import prss
     1.6  from viff.field import GF256, FieldElement
     1.7 -from viff.util import println, wrapper
     1.8 +from viff.util import wrapper
     1.9  
    1.10  from twisted.internet import reactor
    1.11  from twisted.internet.defer import Deferred, DeferredList
    1.12 @@ -269,12 +269,10 @@
    1.13          self.program_counter = [0]
    1.14  
    1.15      def connectionMade(self):
    1.16 -        #print "Transport:", self.transport
    1.17          self.sendString(str(self.factory.runtime.id))
    1.18          try:
    1.19              self.peer_cert = self.transport.socket.peer_certificate
    1.20          except AttributeError:
    1.21 -            #print "No certificate in session"
    1.22              self.peer_cert = None
    1.23  
    1.24      def stringReceived(self, string):
    1.25 @@ -367,7 +365,6 @@
    1.26              for protocol in self.protocols.itervalues():
    1.27                  protocol.program_counter[-1] += 1
    1.28                  protocol.program_counter.append(0)
    1.29 -            #println("Calling %s: %s", method.func_name, self.program_counter)
    1.30              return method(self, *args, **kwargs)
    1.31          finally:
    1.32              for protocol in self.protocols.itervalues():
    1.33 @@ -465,7 +462,7 @@
    1.34          """
    1.35  
    1.36          def stop(_):
    1.37 -            println("Initiating shutdown sequence.")
    1.38 +            print "Initiating shutdown sequence."
    1.39              for protocol in self.protocols.itervalues():
    1.40                  protocol.loseConnection()
    1.41              reactor.stop()
    1.42 @@ -516,7 +513,6 @@
    1.43                  protocol.program_counter = pc
    1.44  
    1.45          saved_pcs = get_pcs()
    1.46 -        #println("Saved PC: %s for %s", saved_pc, func.func_name)
    1.47  
    1.48          @wrapper(func)
    1.49          def callback_wrapper(*args, **kwargs):
    1.50 @@ -524,12 +520,10 @@
    1.51              try:
    1.52                  current_pcs = get_pcs()
    1.53                  set_pcs(saved_pcs)
    1.54 -                #println("Callback PC: %s", self.program_counter)
    1.55                  return func(*args, **kwargs)
    1.56              finally:
    1.57                  set_pcs(current_pcs)
    1.58  
    1.59 -        #println("Adding %s to %s", func.func_name, deferred)
    1.60          deferred.addCallback(callback_wrapper, *args, **kwargs)
    1.61  
    1.62      @increment_pc
    1.63 @@ -856,7 +850,6 @@
    1.64          Returns a list of (id, share) pairs.
    1.65          """
    1.66          shares = shamir.share(number, self.threshold, self.num_players)
    1.67 -        #println("Shares of %s: %s", number, shares)
    1.68  
    1.69          result = []
    1.70          for peer_id, share in shares:
    1.71 @@ -1113,7 +1106,7 @@
    1.72  
    1.73      for peer_id, player in players.iteritems():
    1.74          if peer_id > id:
    1.75 -            println("Will connect to %s", player)
    1.76 +            print "Will connect to %s" % player
    1.77              if options and options.tls:
    1.78                  reactor.connectTLS(player.host, player.port, factory, cred)
    1.79              else: