summaryrefslogtreecommitdiff
path: root/rhimport
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2010-04-09 09:35:38 (GMT)
committerChristian Pointner <equinox@helsinki.at>2010-04-09 09:35:38 (GMT)
commit264ac76b78b200487ae42a8ca2b5f71632c47dc2 (patch)
tree7d4e13abde692dbe74f86ab38f98482af26208e7 /rhimport
parent7e563eecd8b86a372a1e8040c01debd7ebede909 (diff)
fixed return values
added error callback
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;
}