On Apr 17, 2010, at 21:10, [email protected] wrote:

> Avoid catch which masks any error, instead test if the file actually exists

I was gonna ask about this, with regard to the python portgroups. Shouldn't we 
be doing this:



$ svn di python26-1.0.tcl 
Index: python26-1.0.tcl
===================================================================
--- python26-1.0.tcl    (revision 66541)
+++ python26-1.0.tcl    (working copy)
@@ -64,7 +64,7 @@
 post-destroot {
     if {${python.link_binaries}} {
         foreach bin [glob -nocomplain -tails -directory 
"${destroot}${python.prefix}/bin" *] {
-            if {[catch {file type 
"${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
+            if {![file exists 
"${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"]} {
                 ln -s "${python.prefix}/bin/${bin}" 
"${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
             }
         }



Or is the catch doing something more?



_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to