diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-03-02 19:23:59 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-03-02 19:23:59 (GMT) |
commit | 4de2c5950b5e8a3fc837ed03a0b32f319b2b9e58 (patch) | |
tree | 7da6e0a37efd474a18b2c728f57b25b7b13b6002 | |
parent | 07ca462f509e1942ec22c5e6d19545bf4016dd59 (diff) | |
download | blt-4de2c5950b5e8a3fc837ed03a0b32f319b2b9e58.zip blt-4de2c5950b5e8a3fc837ed03a0b32f319b2b9e58.tar.gz blt-4de2c5950b5e8a3fc837ed03a0b32f319b2b9e58.tar.bz2 |
clean up samp
-rw-r--r-- | ds9/library/samp.tcl | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/ds9/library/samp.tcl b/ds9/library/samp.tcl index 63f7085..e486257 100644 --- a/ds9/library/samp.tcl +++ b/ds9/library/samp.tcl @@ -36,7 +36,9 @@ proc SAMPConnect {{verbose 1}} { } # reset samp array - catch {unset samp} + if {[info exists samp]} { + unset samp + } set samp(apps,image) {} set samp(apps,table) {} set samp(apps,votable) {} @@ -54,7 +56,9 @@ proc SAMPConnect {{verbose 1}} { if {$verbose} { Error "SAMP: [msgcat::mc {unable to locate HUB}]" } - catch {unset samp} + if {[info exists samp]} { + unset samp + } return } @@ -65,7 +69,9 @@ proc SAMPConnect {{verbose 1}} { if {$verbose} { Error "SAMP: [msgcat::mc {internal error}] $rr" } - catch {unset samp} + if {[info exists samp]} { + unset samp + } return } set rr [lindex $rr 1] @@ -100,7 +106,9 @@ proc SAMPConnect {{verbose 1}} { if {$verbose} { Error "SAMP: [msgcat::mc {internal error}] $rr" } - catch {unset samp} + if {[info exists samp]} { + unset samp + } return } @@ -117,7 +125,9 @@ proc SAMPConnect {{verbose 1}} { if {$verbose} { Error "SAMP: [msgcat::mc {internal error}] $rr" } - catch {unset samp} + if {[info exists samp]} { + unset samp + } return } @@ -162,7 +172,9 @@ proc SAMPConnect {{verbose 1}} { if {$verbose} { Error "SAMP: [msgcat::mc {internal error}] $rr" } - catch {unset samp} + if {[info exists samp]} { + unset samp + } return } @@ -645,7 +657,9 @@ proc SAMPShutdown {} { UpdateCATDialog # unset samp array - catch {unset samp} + if {[info exists samp]} { + unset samp + } } proc SAMPUpdate {} { |