diff --git a/scripts/ehive_unblock.pl b/scripts/ehive_unblock.pl index dc46c8ea72798a4be38bed9213139ddd6a8b6509..46dcdd01b1c70b597dff752de2ab134fecc5801d 100755 --- a/scripts/ehive_unblock.pl +++ b/scripts/ehive_unblock.pl @@ -12,9 +12,13 @@ GetOptions('help' => \$help, ); if ($help) { usage(); } +unless($url) { printf("must specifiy -url\n\n"); usage(); } my $job = Bio::EnsEMBL::Hive::URLFactory->fetch($url); -die("Unable to fecth job via url $url\n") unless($job); +unless($job and $job->isa('Bio::EnsEMBL::Hive::AnalysisJob')) { + printf("Unable to fetch job via url: $url\n\n"); + usage(); +} $job->print_job; $job->update_status('READY');