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)
commit283dd3e8f08217e28170e47a79a4dc56a518ff69 (patch)
tree7d4e13abde692dbe74f86ab38f98482af26208e7 /rhimport
parent65edbe8fd22d32c9adf64f40065eb79992740f5e (diff)
fixed return values
added error callback git-svn-id: https://svn.helsinki.at/rhimport/trunk@36 7c65635b-ec39-4f67-a626-873dbafdd612
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;
}