From f511412b8e40028665ac1f7761ca9db8d5f983d6 Mon Sep 17 00:00:00 2001 From: Mercier Pierre-Olivier Date: Thu, 12 Sep 2013 13:35:48 +0200 Subject: [PATCH] Fix continue on error --- process/files/intradata_get.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);