Update copying fields to loop over all keys
@@ -1415,9 +1415,10 @@ class Chip:
self.set(*arg, cfg=dst, clobber=clobber)
# update other fields that a user might modify
- fields_to_copy = ('copy', 'lock', 'filehash', 'date', 'author', 'signature')
- for field in fields_to_copy:
- if field not in self.getdict(*keylist, cfg=cfg):
+ for field in self.getdict(*keylist, cfg=cfg).keys():
+ if field in ('value', 'switch', 'type', 'require', 'defvalue',
+ 'shorthelp', 'example', 'help'):
+ # skip these fields (value handled above, others are static)
continue
v = self.get(*keylist, cfg=cfg, field=field)
self.set(*keylist, v, cfg=dst, field=field)
