@@ -251,14 +251,16 @@ def readConfig(self):
251251 self .fb_dir = os .path .expanduser (localcfg ['Fireballs' ]['basedir' ].replace ('$HOME' ,'~' )).replace ('\\ ' ,'/' )
252252 os .makedirs (self .fb_dir , exist_ok = True )
253253
254- try :
254+ self .gmn_key = None
255+ self .gmn_user = None
256+ self .gmn_server = None
257+ if localcfg .has_option ('gmnkey' ,'gmnkey' ):
255258 self .gmn_key = localcfg ['gmn' ]['gmnkey' ]
256259 self .gmn_user = localcfg ['gmn' ]['gmnuser' ]
257260 self .gmn_server = localcfg ['gmn' ]['gmnserver' ]
258- except :
259- self .gmn_key = None
260261
261- try :
262+ self .api_key = None
263+ if localcfg .has_option ('ukmon' ,'apikey' ):
262264 self .api_key = localcfg ['ukmon' ]['apikey' ]
263265 if os .path .isfile (os .path .expanduser (self .api_key )):
264266 key = open (os .path .expanduser (self .api_key ), 'r' ).readlines ()[0 ].strip ()
@@ -267,26 +269,22 @@ def readConfig(self):
267269 if len (key ) < 40 :
268270 key = None
269271 self .api_key = key
270- except :
271- self .api_key = None
272- # log.info(f'apikey "{self.api_key}"')
273272
274- try :
273+ self .wmpl_loc = None
274+ if localcfg .has_option ('solver' ,'wmpl_loc' ):
275275 self .wmpl_loc = os .path .expanduser (localcfg ['solver' ]['wmpl_loc' ].replace ('$HOME' ,'~' )).replace ('\\ ' ,'/' )
276276 self .wmpl_env = localcfg ['solver' ]['wmpl_env' ]
277- except :
278- self .wmpl_loc = None
279- try :
277+ log .info (f'wmpl_loc { self .wmpl_loc } ' )
278+
279+ self .rms_loc = None
280+ if localcfg .has_option ('reduction' ,'rms_loc' ):
280281 self .rms_loc = os .path .expanduser (localcfg ['reduction' ]['rms_loc' ].replace ('$HOME' ,'~' )).replace ('\\ ' ,'/' )
281282 self .rms_env = localcfg ['reduction' ]['rms_env' ]
282- except :
283- self . rms_loc = None
284-
285- try :
283+
284+
285+ self . share_loc = None
286+ if localcfg . has_option ( 'share' , 'shrfldr' ) :
286287 self .share_loc = os .path .expanduser (localcfg ['sharing' ]['shrfldr' ].replace ('$HOME' ,'~' )).replace ('\\ ' ,'/' )
287- except :
288- self .share_loc = None
289- return
290288
291289 def quitApplication (self ):
292290 print ('quitting' )
@@ -375,6 +373,11 @@ def initUI(self):
375373 else :
376374 wmplavailable = 'disabled'
377375
376+ log .info (f'rms available { rmsavailable } ' )
377+ log .info (f'share available { shareavailable } ' )
378+ log .info (f'gmn available { gmnavailable } ' )
379+ log .info (f'wmpl available { wmplavailable } ' )
380+
378381 rawMenu = Menu (self .menuBar , tearoff = 0 )
379382 rawMenu .add_command (label = "Get Live Images" , command = self .getData )
380383 rawMenu .add_command (label = "Get Videos" , command = self .getVids )
0 commit comments