#NEWLINE# def _load_fits( self , private_key , sender_id , msg_id , mtype , params , extra ) : #NEWLINE# #INDENT# url = params [ 'url' ] #NEWLINE# self . count += 1 #NEWLINE# name = ( 'samp_%d.fits' % self . count ) #NEWLINE# filedir = self . settings . get ( 'cache_location' , self . fv . tmpdir ) #NEWLINE# fitspath = os . path . join ( params , name ) #NEWLINE# chname = self . settings . get ( 'SAMP_channel' , 'SAMP' ) #NEWLINE# dowait = True #NEWLINE# self . logger . debug ( ( 'downloading %s <-- %s' % ( fitspath , url ) ) ) #NEWLINE# try : #NEWLINE# #INDENT# self . fetcher . fetch ( url , filepath = fitspath ) #NEWLINE# self . robj . display_fitsfile ( chname , fitspath , dowait ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# errmsg = ( "Error loading FITS file '%s': %s" % ( fitspath , str ( e ) ) ) #NEWLINE# self . logger . error ( errmsg ) #NEWLINE# raise SAMPError ( errmsg )