Make sure we don't try to print to an undefined filehandle, if there's an error when...
authorDan Boger <zigdon@irc.peeron.com>
Thu, 28 Jan 2010 23:09:30 +0000 (15:09 -0800)
committerDan Boger <zigdon@irc.peeron.com>
Thu, 28 Jan 2010 23:09:30 +0000 (15:09 -0800)
twirssi.pl

index c133378cf92f23aeefcd8aac4f9f72e9c292c8a6..64c344f430e47e2a6608458db55eb2c13def538c 100644 (file)
@@ -524,7 +524,7 @@ sub cmd_login {
                 );
             } else {
                 $twit = Net::Twitter->new(
-                    traits       => [ 'API::REST', 'OAuth', 'API::Search' ],
+                    traits => [ 'API::REST', 'OAuth', 'API::Search' ],
                     consumer_key => 'BZVAvBma4GxdiRwXIvbnw',
                     consumer_secret =>
                       '0T5kahwLyb34vciGZsgkA9lsjtGCQ05vxVE2APXM',
@@ -955,7 +955,8 @@ sub load_friends {
     };
 
     if ($@) {
-        print $fh "type:debug Error during friends list update.  Aborted.\n";
+        print $fh "type:debug Error during friends list update.  Aborted.\n"
+          if $fh;
         return;
     }