Project

General

Profile

Feature #21251

fife_launch should whine if multiple arg_n for the same n are given

Added by Marc Mengel about 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
10/29/2018
Due date:
% Done:

0%

Estimated time:
Duration:

Description

One can over time with copy and paste, etc. end up with

[executable]
...
arg_1      = -c
arg_2      = %(fclfile)s
arg_3      = -o
arg_4      = %(basename)s_\${CLUSTER}_\${PROCESS}.root
arg_5      = -n
arg_6      = %(nevents)s
arg_5      = -T
arg_6      = hist_%(basename)s_\${CLUSTER}_\${PROCESS}.root

that is, with two arg_5 and arg_6 lines, which will stomp on the previous ones and lose (in this case) the -n for number of events.

We should whine & complain.

History

#1 Updated by Marc Mengel about 1 year ago

  • Target version changed from v3_2_5 to v3_3

So I think I'm punting this to a later release.

We're using Python's "ConfigParser" module, which in python 2.7 doesn't have an
obvious way to do this. I can make an OrderedDict subclass that whines when you
overwrite something, and give that to ConfigParser but then I have to ignore it a bunch of places (i.e. when we do overrides, etc.) and it doesn't know, for example, what line of the config file we're on.... If we move up to python3 there are options for all this in configparser (the strict=True option).



Also available in: Atom PDF