@@ -114,6 +114,7 @@ def on_validate(self, new_value):
114114
115115
116116class fbCollector (Frame ):
117+
117118 def __init__ (self , parent , patt = None ):
118119 Frame .__init__ (self , parent , bg = global_bg )
119120 parent .configure (bg = global_bg ) # Set backgound color
@@ -553,8 +554,12 @@ def get_bin_list(self):
553554 targdir = os .path .join (self .dir_path , 'jpgs' )
554555 else :
555556 targdir = os .path .join (self .dir_path , 'stacks' )
556- #print(targdir)
557- bin_list = [line for line in os .listdir (targdir ) if self .correct_datafile_name (line )]
557+ print (targdir )
558+ if os .path .isdir (targdir ):
559+ bin_list = [line for line in os .listdir (targdir ) if self .correct_datafile_name (line )]
560+ else :
561+ log .info ('no jpgs available' )
562+ bin_list = []
558563 return bin_list
559564
560565 def update_listbox (self , bin_list ):
@@ -596,6 +601,8 @@ def archiveFolder(self):
596601 noimage = ImageTk .PhotoImage (noimgdata )
597602 self .imagelabel .configure (image = noimage )
598603 self .imagelabel .image = noimage
604+ if self .dir_path == self .fb_dir .strip ():
605+ self .loadFolder ()
599606 if self .dir_path is not None and self .dir_path != self .fb_dir :
600607 try :
601608 _ , fldr = os .path .split (os .path .normpath (self .dir_path ))
@@ -912,6 +919,7 @@ def getGMNData(self):
912919 shutil .copy (os .path .join (srcdir , f ), targ )
913920 shutil .rmtree (os .path .join (self .dir_path , dtstr ))
914921 tkMessageBox .showinfo ("Data Collected" , 'data collected from GMN' )
922+ self .update_listbox (self .get_bin_list ())
915923 return
916924
917925
0 commit comments