@@ -281,6 +281,7 @@ def __init__(self, pyradio_config,
281281                 req_player = '' ,
282282                 theme = '' ,
283283                 force_update = '' ):
284+         self ._no_netifaces  =  False 
284285        self ._current_selection  =  0 
285286        self ._force_print_all_lines  =  False 
286287        self ._system_asked_to_terminate  =  False 
@@ -378,6 +379,7 @@ def __init__(self, pyradio_config,
378379                self .ws .EDIT_STATION_URL_ERROR : self ._print_editor_url_error ,
379380                self .ws .PY2_EDITOR_ERROR : self ._print_py2_editor_error ,
380381                self .ws .REQUESTS_MODULE_NOT_INSTALLED_ERROR : self ._print_requests_not_installed_error ,
382+                 self .ws .NETIFACES_MODULE_NOT_INSTALLED_ERROR : self ._print_netifaces_not_installed_error ,
381383                self .ws .DNSPYTHON_MODULE_NOT_INSTALLED_ERROR : self ._print_dnspython_not_installed_error ,
382384                self .ws .CLEAR_REGISTER_MODE : self ._print_clear_register ,
383385                self .ws .CLEAR_ALL_REGISTERS_MODE : self ._print_clear_all_registers ,
@@ -992,6 +994,9 @@ def refreshBody(self, start=0):
992994            self ._show_theme_not_supported ()
993995        elif  self ._cnf .user_param_id  ==  - 1 :
994996            self ._print_user_parameter_error ()
997+         elif  self ._no_netifaces :
998+             self ._no_netifaces  =  False 
999+             self ._print_netifaces_not_installed_error ()
9951000        # elif not self._cnf.use_themes: 
9961001        #     self._show_no_themes() 
9971002
@@ -1026,6 +1031,8 @@ def refreshNoDepencency(self):
10261031        self .bodyWin .addstr ('dnspython' , curses .color_pair (4 ))
10271032        self .bodyWin .addstr (14 ,1 , '      3. ' , curses .color_pair (5 ))
10281033        self .bodyWin .addstr ('psutil ' , curses .color_pair (4 ))
1034+         self .bodyWin .addstr (15 ,1 , '      3. ' , curses .color_pair (5 ))
1035+         self .bodyWin .addstr ('netifaces' , curses .color_pair (4 ))
10291036        self .outerBodyWin .refresh ()
10301037        self .bodyWin .refresh ()
10311038
@@ -3213,6 +3220,23 @@ def _print_dnspython_not_installed_error(self):
32133220                        prompt = ' Press any key ' ,
32143221                        is_message = True )
32153222
3223+     def  _print_netifaces_not_installed_error (self ):
3224+         txt  =  ''' 
3225+         Module "|netifaces|" not found! 
3226+ 
3227+         In order to use the |Remote Control Server|, the 
3228+         "|netifaces|" module must be installed. 
3229+ 
3230+         Exit |PyRadio| now, install the module (named 
3231+         |python-netifaces| or |python{}-netifaces|) and try 
3232+         executing |PyRadio| again. 
3233+         ''' 
3234+         self ._show_help (txt .format (python_version [0 ]),
3235+                         self .ws .NETIFACES_MODULE_NOT_INSTALLED_ERROR ,
3236+                         caption = ' Module Error ' ,
3237+                         prompt = ' Press any key ' ,
3238+                         is_message = True )
3239+ 
32163240    def  _print_requests_not_installed_error (self ):
32173241        txt  =  ''' 
32183242        Module "|requests|" not found! 
@@ -9256,6 +9280,10 @@ def _start_remote_control_server(self):
92569280                '/html_init' : self ._html_init_song_title ,
92579281            }
92589282        )
9283+         if  not  self ._remote_control_server .has_netifaces :
9284+             self ._remote_control_server  =  None 
9285+             self ._no_netifaces  =  True 
9286+             return 
92599287        self ._remote_control_server_thread  =  threading .Thread (
92609288            target = self ._remote_control_server .start_remote_control_server ,
92619289            args = (
0 commit comments