Commit a4390ef9 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

code review with floreal

parent c7ca4f2c
This diff is collapsed.
......@@ -22,8 +22,6 @@ import os
from jflow.config_reader import JFlowConfigReader
# Define some Error classes
class InvalidFormatError(Exception): pass
jflowconf = JFlowConfigReader()
......
#
# Copyright (C) 2015 INRA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
class RuleException (Exception):
class InvalidFormatError(Exception):
pass
class RuleException (Exception):
pass
class RuleIgnore (Exception):
pass
......@@ -44,10 +44,11 @@ from jflow.workflows_manager import WorkflowsManager
from jflow.config_reader import JFlowConfigReader
from jflow.utils import get_octet_string_representation, get_nb_octet
from jflow.parameter import *
from cctools.util import time_format
from jflow.exceptions import RuleException
import jflow.rules as j_rules
from cctools.util import time_format
from weaver.script import ABSTRACTIONS
from weaver.script import DATASETS
from weaver.script import FUNCTIONS
......@@ -1268,7 +1269,7 @@ class Workflow(threading.Thread):
rules[parameter.name] = parameter.rules.split(";")
if isinstance(parameter, InputFileList) and parameter.name in user_params:
if len(set(user_params[parameter.name])) < len(user_params[parameter.name]):
raise Exception("Error for parameter " + parameter.name + ": some files are duplicated")
raise RuleException("Error for parameter " + parameter.name + ": some files are duplicated")
# Check rules:
for src_arg, arg_rules in rules.items():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment