summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-07-24 13:28:06 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-07-24 13:28:06 (GMT)
commitd10a643c1f4c9be6c9b3e1211064ef5fba053645 (patch)
tree7fa39304b9debbff10ad8e9d61fb6d0068ba8da0
parent6418c2c469db7df7f8a83990017b0c9e3020f359 (diff)
error callback without interaction
wrong print "\n" fixed deleting carts if now import for today
-rw-r--r--debian/changelog6
-rwxr-xr-xrhimport-dn16
2 files changed, 16 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 0928695..39e6ff1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+rhimport (0.3.3-1) unstable; urgency=low
+
+ * new upstream release 0.3.3
+
+ -- Christian Pointner <equinox@helsinki.at> Sun, 24 Jul 2011 15:27:12 +0200
+
rhimport (0.3.2-1) unstable; urgency=low
* new upstream release 0.3.2
diff --git a/rhimport-dn b/rhimport-dn
index ca7d4b2..dce71bc 100755
--- a/rhimport-dn
+++ b/rhimport-dn
@@ -126,20 +126,24 @@ for my $entry ($feed->entries) {
print "\nPV: note added successfully";
print join('', <$reader>) . "\n";
}
+ print "\n";
}
- print "\n";
}
}
-($file ne "") or die "No Entry found for today!\n";
-(-e "$file") or die "file '$file' not found - donwload error?\n";
+if($file eq "" || !(-e "$file")) {
+ print "No Entry found for today or download error - just clearing cart!\n";
+ rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";
+ rhimport::clear_carts($dbh, $group, $to_cart);
+ exit 1;
+}
+
print "will import $file to dropbox $dropbox (cart=$to_cart)\n\n";
my $error_cb = sub {
my ($text) = @_;
- print "\n$text .. cancel operation [Y/n]? ";
- my $x = scalar(<STDIN>);
- $x =~ /^n/i;
+ print "\n$text";
+ return 0;
};
rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n";