Package: fetchyahoo
Version: 2.8.6-5
Severity: minor
Tags: patch

Fetchyahoo is giving me erroneous error messages such as:

Warning: You are using 100% of your 10MB limit (warning-level=80%).

The "10MB" limit jumps around depending on the stochasticity.


I have "warning-level = 80" set in ~/.fetchyahoorc.

The cause is Yahoo's box limit upping to 2GB. The parser looks for "MB".

Here's a patch:
--- /usr/bin/fetchyahoo 2005-04-11 16:07:57.000000000 +1200
+++ fetchyahoo  2005-06-08 21:41:26.000000000 +1200
@@ -625,13 +625,13 @@
     MyDie("Failed: Yahoo user $username does not exist\n");
 }

-# parses out quota used/limit (by looking for 'xx% ... xxMB')
-if ( $content =~ /(\d+(?:\.\d+)?)%.+?(\d+(?:\.\d+)?)MB/ ) {
+# parses out quota used/limit (by looking for 'xx% ... xxGB')
+if ( $content =~ /(\d+(?:\.\d+)?)%.+?(\d+(?:\.\d+)?)GB/ ) {
   my ($percentUsed, $limitMB) = ($1, $2);
-  printf "You are using %s%% of your %sMB limit.\n", $percentUsed, $limitMB
+  printf "You are using %s%% of your %sGB limit.\n", $percentUsed, $limitMB
     unless $quiet;
   if( $warningLevel && $percentUsed >= $warningLevel){
-    printf "Warning: You are using %s%% of your %sMB limit ".
+    printf "Warning: You are using %s%% of your %sGB limit ".
         "(warning-level=%d%%).\n", $percentUsed, $limitMB, $warningLevel
         unless $noerrors;
   }



thanks,
Hamish


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to