@@ -43,7 +43,7 @@ def subscribe(self, title, plot):
4343 if title not in self ._subscribed_titles :
4444 self ._subscribed_titles [title ] = [plot ]
4545 try :
46- self ._data_socket .subscribe (bytes ( title ) )
46+ self ._data_socket .subscribe (title )
4747 self .subscribed .emit (title )
4848 logging .debug ("Subscribing to %s on %s." , title , self .name ())
4949 # socket might still not exist
@@ -58,7 +58,7 @@ def unsubscribe(self, title, plot):
5858 self ._subscribed_titles [title ].remove (plot )
5959 # Check if list is empty
6060 if not self ._subscribed_titles [title ]:
61- self ._data_socket .unsubscribe (bytes ( title ) )
61+ self ._data_socket .unsubscribe (title )
6262 self .unsubscribed .emit (title )
6363 logging .debug ("Unsubscribing from %s on %s." , title , self .name ())
6464 self ._subscribed_titles .pop (title )
@@ -71,7 +71,7 @@ def subscribe_for_recording(self, title):
7171 if title not in self ._recorded_titles :
7272 self ._recorded_titles [title ] = True
7373 try :
74- self ._data_socket .subscribe (bytes ( title ) )
74+ self ._data_socket .subscribe (title )
7575 self .subscribed .emit (title )
7676 logging .debug ("Subscribing to %s on %s." , title , self .name ())
7777 # socket might still not exist
@@ -83,7 +83,7 @@ def unsubscribe_for_recording(self, title):
8383 If no one else is associated with it unsubscrine"""
8484 self ._recorded_titles [title ] = False
8585 if not title in self ._subscribed_titles :
86- self ._data_socket .unsubscribe (bytes ( title ) )
86+ self ._data_socket .unsubscribe (title )
8787 self .unsubscribed .emit (title )
8888 logging .debug ("Unsubscribing from %s on %s." , title , self .name ())
8989 self ._recorded_titles .pop (title )
@@ -109,15 +109,15 @@ def _connect(self):
109109
110110 def _get_data_port (self ):
111111 """Ask to the backend for the data port"""
112- self ._ctrl_socket .send_multipart (['data_port' ])
112+ self ._ctrl_socket .send_multipart (['data_port' . encode ( 'UTF-8' ) ])
113113
114114 def query_configuration (self ):
115115 """Ask to the backend for the configuration"""
116- self ._ctrl_socket .send_multipart (['conf' ])
116+ self ._ctrl_socket .send_multipart (['conf' . encode ( 'UTF-8' ) ])
117117
118118 def query_reloading (self ):
119119 """Ask the backend to reload its configuration"""
120- self ._ctrl_socket .send_multipart (['reload' ])
120+ self ._ctrl_socket .send_multipart (['reload' . encode ( 'UTF-8' ) ])
121121
122122 def _get_request_reply (self , socket = None ):
123123 """Handle the reply of the backend to a previous request"""
0 commit comments