Commits

Ginés Martínez Sánchez  committed ff1bff6 Draft

developing examples inter_event

  • Participants
  • Parent commits 780fc13

Comments (0)

Files changed (1)

File ginsfsm/router.py

             self.serial = 1
         return self.serial
 
+    def __str__(self):
+        return "%s %s " % (self.gaplic_name, self.route_ref)
+
     def __repr__(self):
         return "\nSTATIC ROUTE:\n  gaplic_name: %s\n  roles: %s\n  " \
             "route_ref: %s\n  connex: %s\n" % (
-            self.gaplic_name,
-            self.roles,
-            self.route_ref,
-            self.connex_handler.config.destinations,
-        )
+                self.gaplic_name,
+                self.roles,
+                self.route_ref,
+                self.connex_handler.config.destinations,
+            )
 
 
 class DynamicRoute(object):
             self.serial = 1
         return self.serial
 
+    def __str__(self):
+        return "%s %s " % (self.gaplic_name, self.route_ref)
+
+    def __repr__(self):
+        return "\nSTATIC ROUTE:\n  gaplic_name: %s\n  roles: %s\n  " \
+            "route_ref: %s\n  gsock: %r\n" % (
+                self.gaplic_name,
+                self.roles,
+                self.route_ref,
+                self.gsock,
+            )
+
 
 class EmptyRoute(object):
     """ Empty route
     websocket = event.source[-1]
     websocket.write = websocket.send_jsonfied_message
 
-    # send our identity card
+    # send our identity card if iam client
+    # we only send the identity card in static routes!
     if not websocket.config.iam_server:
         self.send_identity_card(websocket.write)