summaryrefslogtreecommitdiff
path: root/rhimport
diff options
context:
space:
mode:
Diffstat (limited to 'rhimport')
-rwxr-xr-xrhimport21
1 files changed, 10 insertions, 11 deletions
diff --git a/rhimport b/rhimport
index 0ccfa0e..3e3a36e 100755
--- a/rhimport
+++ b/rhimport
@@ -64,7 +64,7 @@ options:
-l | --list-allowed list allowed dropboxes and exit
EOF
- exit;
+ exit 0;
}
my $user = `/usr/bin/id -un`;
@@ -90,7 +90,7 @@ sub set_mode_playlist_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
$POOL = 1;
@@ -110,7 +110,7 @@ sub set_mode_file_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
$POOL = 0;
@@ -139,7 +139,7 @@ sub toggle_mode_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
my $co_dropbox = $guixml->get_widget('co_dropbox');
@@ -181,7 +181,7 @@ my $gui_progress_cb = sub {
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
my $progressbar = $guixml->get_widget('progressbar');
$progressbar->set_text("($elapsed/$max) $text");
@@ -196,7 +196,7 @@ sub start_import_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
my $l_status = $guixml->get_widget('l_status');
@@ -242,7 +242,7 @@ sub show_used_carts_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
my $co_dropbox = $guixml->get_widget('co_dropbox');
@@ -267,7 +267,7 @@ sub clear_status_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
my $l_status = $guixml->get_widget('l_status');
@@ -282,7 +282,7 @@ sub dropbox_updated_gui()
{
if(!$guixml) {
print STDERR "no GUI definition found!\n";
- exit 0;
+ exit 2;
}
my $co_dropbox = $guixml->get_widget('co_dropbox');
@@ -372,8 +372,7 @@ if($POOL) {
$dbh->disconnect();
-if($ret ne "") {
- print STDERR $ret;
+if(!$ret) {
exit 1;
}