trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1103927 - /trafficserver/traffic/trunk/contrib/perl/ConfigMgmt/lib/Apache/TS/Config/Records.pm
Date Mon, 16 May 2011 22:18:52 GMT
Author: zwoop
Date: Mon May 16 22:18:52 2011
New Revision: 1103927

URL: http://svn.apache.org/viewvc?rev=1103927&view=rev
Log:
Fix open() to check for errors

Modified:
    trafficserver/traffic/trunk/contrib/perl/ConfigMgmt/lib/Apache/TS/Config/Records.pm

Modified: trafficserver/traffic/trunk/contrib/perl/ConfigMgmt/lib/Apache/TS/Config/Records.pm
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/contrib/perl/ConfigMgmt/lib/Apache/TS/Config/Records.pm?rev=1103927&r1=1103926&r2=1103927&view=diff
==============================================================================
--- trafficserver/traffic/trunk/contrib/perl/ConfigMgmt/lib/Apache/TS/Config/Records.pm (original)
+++ trafficserver/traffic/trunk/contrib/perl/ConfigMgmt/lib/Apache/TS/Config/Records.pm Mon
May 16 22:18:52 2011
@@ -82,7 +82,7 @@ sub load {
     $fn = $args{filename} unless defined($fn);
     $fn = $self->{_filename} unless defined($fn);
 
-    open(FH, "<$fn");
+    open(FH, "<$fn") || die "Can't open file $fn for reading";
     while (<FH>) {
         chomp;
         my @p = split(/\s+/, $_, 4);



Mime
View raw message