Fixed comments bug with obi head and obi tail

This commit is contained in:
Celine Mercier
2018-10-21 17:39:17 +02:00
parent e18b762d81
commit d53323e7f4
3 changed files with 14 additions and 5 deletions

6
python/obitools3/commands/head.pyx Normal file → Executable file
View File

@ -65,14 +65,14 @@ def run(config):
# Save command config in View comments
command_line = " ".join(sys.argv[1:])
comments = View.print_config(config, "head", command_line, input_dms_name=[i_dms.name], input_view_name=[i_view.name])
comments = View.get_config_dict(config, "head", command_line, input_dms_name=[i_dms.name], input_view_name=[i_view.name])
# Create output view with the line selection
try:
o_view = selection.materialize(output_view_name, comments=comments)
except Exception, e:
raise RollbackException("obi head error, rollbacking view: "+str(e), o_view)
# TODO DISCUSS if output URI to different DMS, copy view?
# Save command config in DMS comments

2
python/obitools3/commands/tail.pyx Normal file → Executable file
View File

@ -65,7 +65,7 @@ def run(config):
# Save command config in View comments
command_line = " ".join(sys.argv[1:])
comments = View.print_config(config, "tail", command_line, input_dms_name=[i_dms.name], input_view_name=[i_view.name])
comments = View.get_config_dict(config, "tail", command_line, input_dms_name=[i_dms.name], input_view_name=[i_view.name])
# Create output view with the line selection
try: