report errors connecting to sqlradius dbs on upgrade
[freeside.git] / FS / FS / Upgrade.pm
index e4561e7..37167a8 100644 (file)
@@ -122,6 +122,12 @@ sub upgrade_sqlradius {
       { PrintError => 0, PrintWarn => 0 }
     );
 
+    unless $dbh {
+      warn "can't connect to RADIUS database ".
+           $part_export->option('datasrc').  ": $DBI::errstr\n";
+      next;
+    }
+
     my $errmsg = 'Error adding FreesideStatus to '.
                  $part_export->option('datasrc'). ': ';