diff --git a/process/files/intradata_get.pl b/process/files/intradata_get.pl index fa70bc6..349b125 100644 --- a/process/files/intradata_get.pl +++ b/process/files/intradata_get.pl @@ -34,6 +34,8 @@ sub create_tree($$) if (! -e "$basedir/$year/$project_id/") { mkdir "$basedir/$year/$project_id/"; } + + return 0; } @@ -60,7 +62,7 @@ sub update_project log INFO, "Update $year/$project_id/butler.xml"; - create_tree($project_id, $year); + return $_ if (! create_tree($project_id, $year)); open my $out, ">", "$year/$project_id/butler.xml"; print $out $butler; @@ -84,6 +86,7 @@ sub process_get if (! exists $actions{$type}{$action}) { log WARN, "Unknown action '$action' for $type."; + return "Unknown action '$action' for $type."; } return $actions{$type}{$action}($args);