[freeside-commits] freeside/FS/FS Upgrade.pm,1.16,1.17

Ivan,,, ivan at wavetail.420.am
Tue Jul 15 16:25:10 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv16210

Modified Files:
	Upgrade.pm 
Log Message:
where in the world is $DBI::errstr

Index: Upgrade.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Upgrade.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Upgrade.pm	15 Jul 2008 23:18:52 -0000	1.16
+++ Upgrade.pm	15 Jul 2008 23:25:08 -0000	1.17
@@ -117,20 +117,18 @@
   my @part_export = FS::part_export::sqlradius->all_sqlradius_withaccounting();
 
   foreach my $part_export ( @part_export ) {
+
+    my $errmsg = 'Error adding FreesideStatus to '.
+                 $part_export->option('datasrc'). ': ';
+
     my $dbh = DBI->connect(
       ( map $part_export->option($_), qw ( datasrc username password ) ),
       { PrintError => 0, PrintWarn => 0 }
-    );
-
-    unless ($dbh) {
-      warn "can't connect to RADIUS database ".
-           $part_export->option('datasrc').  ": $DBI::errstr\n";
+    ) or do {
+      warn $errmsg.$DBI::errstr;
       next;
-    }
+    };
 
-    my $errmsg = 'Error adding FreesideStatus to '.
-                 $part_export->option('datasrc'). ': ';
-  
     my $str2time = str2time_sql( $dbh->{Driver}->{Name} );
     my $group = "UserName";
     $group .= ",Realm"



More information about the freeside-commits mailing list