3535
3636console = Console ()
3737
38- class Questions_Panel_Stackoverflow ():
38+ class Questions_Panel_stackoverflow ():
3939 def __init__ (self ):
4040 self .questions_data = [] # list( list( question_title, question_link, question_id )... )
4141 self .answer_data = defaultdict (lambda : False ) # dict( question_id:list( body, link )) corresponding to self.questions_data
@@ -61,7 +61,6 @@ def populate_question_data(self, questions_list):
6161 sys .exit ()
6262 json_ques_data = resp .json ()
6363 self .questions_data = [[item ['title' ], item ['question_id' ], item ['link' ]] for item in json_ques_data ["items" ]]
64- return
6564
6665 def populate_answer_data (self ):
6766 """ Function to populate answer data property
@@ -110,7 +109,7 @@ def navigate_questions_panel(self):
110109 options_index = question_menu .show ()
111110 try :
112111 options_choice = options [options_index ]
113- except :
112+ except Exception :
114113 return
115114 else :
116115 question_link = self .questions_data [options_index ][2 ]
@@ -160,7 +159,7 @@ def get_que(self, json_data):
160159 return que_id
161160
162161 def get_ans (self , questions_list ):
163- stackoverflow_panel = Questions_Panel_Stackoverflow ()
162+ stackoverflow_panel = Questions_Panel_stackoverflow ()
164163 stackoverflow_panel .populate_question_data (questions_list )
165164 stackoverflow_panel .populate_answer_data ()
166165 stackoverflow_panel .navigate_questions_panel ()
0 commit comments