[82920] branches/gsoc11-statistics/base/src/port/port.tcl

derek at macports.org derek at macports.org
Sun Aug 21 18:23:45 PDT 2011


Revision: 82920
          http://trac.macports.org/changeset/82920
Author:   derek at macports.org
Date:     2011-08-21 18:23:40 -0700 (Sun, 21 Aug 2011)
Log Message:
-----------
Catch errors from curl post

Modified Paths:
--------------
    branches/gsoc11-statistics/base/src/port/port.tcl

Modified: branches/gsoc11-statistics/base/src/port/port.tcl
===================================================================
--- branches/gsoc11-statistics/base/src/port/port.tcl	2011-08-22 00:50:48 UTC (rev 82919)
+++ branches/gsoc11-statistics/base/src/port/port.tcl	2011-08-22 01:23:40 UTC (rev 82920)
@@ -2727,7 +2727,13 @@
             }
             
             set json [json_encode_stats ${macports::stats_id} os ports]
-            curl post "submit\[data\]=$json" ${macports::stats_url}  
+            ui_notice "Submitting to ${macports::stats_url}"
+            
+            if {[catch {curl post "submission\[data\]=$json" ${macports::stats_url}} value]} {
+                global errorInfo
+                ui_error "$errorInfo"
+                return 0
+            }
         }
         default {
             puts "Unknown subcommand. See port help stats"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110821/0ae639e9/attachment.html>


More information about the macports-changes mailing list