From: ivan Date: Thu, 12 Jun 2003 13:57:02 +0000 (+0000) Subject: better error handling for re-imports X-Git-Tag: freeside_1_4_1rc4~28 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=c68a523440c1683cd07e84d7d152a489f23712ec;hp=8b5f871f851f21f85c08281cd9654b6a8a9b237a;p=freeside.git better error handling for re-imports --- diff --git a/bin/passwd.import b/bin/passwd.import index fbf27370f..431e699c5 100755 --- a/bin/passwd.import +++ b/bin/passwd.import @@ -1,5 +1,5 @@ #!/usr/bin/perl -Tw -# $Id: passwd.import,v 1.5 2002-06-21 09:57:05 ivan Exp $ +# $Id: passwd.import,v 1.5.4.1 2003-06-12 13:57:02 ivan Exp $ use strict; use vars qw(%part_svc); @@ -104,7 +104,13 @@ while () { }); my($error); $error=$svc_acct->insert; - die $error if $error; + if ( $error ) { + if ( $error =~ /duplicate/i ) { + warn "$username: $error"; + } else { + die "$username: $error"; + } + } }