Browse Source

start adding more standerd error messages

Chelsea H. Komlo 4 years ago
parent
commit
d6a18c63e9
1 changed files with 4 additions and 2 deletions
  1. 4 2
      client.py

+ 4 - 2
client.py

@@ -120,7 +120,7 @@ class ClientChannelManager(relay.ChannelManager):
         while True:
             if self.guardaddr is None:
                 #randomly-sample a guard
-                print("DANGER: Unimplemented- guard should be selected from any relays.")
+                print("WARNING: Unimplemented! guard should be selected from any relays.")
                 self.guard = self.relaypicker.pick_weighted_relay()
                 # here, we have a SNIP instead of a relay descriptor
                 self.guardaddr = self.guard.snipdict['addr']
@@ -170,7 +170,7 @@ class ClientChannelManager(relay.ChannelManager):
         """Create a new circuit from this client. (Telescoping Walking Onions
         version)"""
 
-        print("TO IMPLEMENT")
+        print("WARNING: Unimplemented! Need to implement building circuits via telescoping.")
 
     def new_circuit(self):
         """Create a new circuit from this client."""
@@ -388,6 +388,8 @@ if __name__ == '__main__':
     circs = []
     for i in range(20):
         circ = clients[0].channelmgr.new_circuit()
+        if circ is None:
+            sys.exit("ERR: Client unable to create circuits")
         circs.append(circ)
         circ.send_cell(relay.StringCell("hello world circuit %d" % i))