mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-12 16:21:13 +00:00
build(metaUpdater): Keep original ordering when adding new entries
This commit is contained in:
parent
1b796b80dd
commit
83ddbcef4c
|
@ -39,7 +39,7 @@ class Manipulator(object):
|
|||
def _handle_person_list_file(self, filename, field_name, **kwargs):
|
||||
fp = open(filename, 'r', encoding='utf8')
|
||||
person_list = self.data.setdefault(field_name, [])
|
||||
for line in fp:
|
||||
for i, line in enumerate(fp, start=0):
|
||||
line = line.strip()
|
||||
m = self.findregex.match(line)
|
||||
if m is None:
|
||||
|
@ -48,7 +48,7 @@ class Manipulator(object):
|
|||
entry = self.update_person_entry(found_entry, m.groupdict(),
|
||||
**kwargs)
|
||||
if found_entry is None:
|
||||
person_list.append(entry)
|
||||
person_list.insert(i, entry)
|
||||
|
||||
|
||||
class CodeMetaManipulator(Manipulator):
|
||||
|
|
Loading…
Reference in New Issue
Block a user