Fixed comments bug with obi head and obi tail
This commit is contained in:
11
python/obitools3/dms/view/view.pyx
Normal file → Executable file
11
python/obitools3/dms/view/view.pyx
Normal file → Executable file
@@ -397,6 +397,15 @@ cdef class View(OBIWrapper) :
|
||||
# Convert to json string
|
||||
comments_json = json.dumps(config_dict)
|
||||
return str2bytes(comments_json)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_config_dict(dict config, str command_name, str command_line, list input_str=None, list input_dms_name=None, list input_view_name=None):
|
||||
config_dict = View._config_to_dict(config, command_name, command_line, \
|
||||
input_str=input_str, input_dms_name=input_dms_name, input_view_name=input_view_name)
|
||||
# Clean virtually empty values
|
||||
config_dict = clean_empty_values_from_object(config_dict, exclude=[View_comments.KEEP_KEYS])
|
||||
return config_dict
|
||||
|
||||
|
||||
@OBIWrapper.checkIsActive
|
||||
@@ -611,7 +620,7 @@ cdef class View_comments(dict): # Not thread safe
|
||||
comments_json = <bytes> view_p.infos.comments
|
||||
comments_json_str = bytes2str(comments_json)
|
||||
comments_dict = json.loads(comments_json_str)
|
||||
str2bytes_object(comments_dict)
|
||||
comments_dict = str2bytes_object(comments_dict)
|
||||
super(View_comments, self).update(comments_dict)
|
||||
|
||||
def __getitem__(self, object key):
|
||||
|
Reference in New Issue
Block a user