From f5bc1e132e486c7d4df3b82a3de681b195f4ec1f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 25 Jan 2012 15:11:49 +0000 Subject: improved output at non-fitting dropbox diff --git a/rhimport-ra b/rhimport-ra index bbe6d26..0c0f49f 100755 --- a/rhimport-ra +++ b/rhimport-ra @@ -56,9 +56,9 @@ my $dbh = DBI->connect("DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Databa my @allowed_dbs = rhimport::get_dropboxes($dbh, $user, $group); if(scalar(@allowed_dbs) != 1) { - print "found multiple Dropboxes for this group?!\n"; + print "found multiple or no Dropboxes for this group?!\n"; $dbh->disconnect(); - exit 0; + exit 1; } my $dropbox = $allowed_dbs[0]->{'PATH'}; my $to_cart = $allowed_dbs[0]->{'TO_CART'}; diff --git a/rhimport-rs b/rhimport-rs index 4e5f87f..1f2ed59 100755 --- a/rhimport-rs +++ b/rhimport-rs @@ -58,7 +58,7 @@ my @allowed_dbs = rhimport::get_dropboxes($dbh, $user, $group); if(scalar(@allowed_dbs) != 2) { print "found more or less than 2 Dropboxes for this group?!\n"; $dbh->disconnect(); - exit 0; + exit 1; } my $idx = 0; diff --git a/rhimport-wl b/rhimport-wl index 492460d..ddfc63e 100755 --- a/rhimport-wl +++ b/rhimport-wl @@ -56,9 +56,9 @@ my $dbh = DBI->connect("DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Databa my @allowed_dbs = rhimport::get_dropboxes($dbh, $user, $group); if(scalar(@allowed_dbs) != 1) { - print "found multiple Dropboxes for this group?!\n"; + print "found multiple or no Dropboxes for this group?!\n"; $dbh->disconnect(); - exit 0; + exit 1; } my $dropbox = $allowed_dbs[0]->{'PATH'}; my $to_cart = $allowed_dbs[0]->{'TO_CART'}; -- cgit v0.10.2