We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3a1cfb commit 4e53b4eCopy full SHA for 4e53b4e
1 file changed
bagit.py
@@ -657,7 +657,7 @@ def _load_tag_file(tag_file_name):
657
tags[name] = value
658
continue
659
660
- if not type(tags[name]) is list:
+ if not isinstance(tags[name], list):
661
tags[name] = [tags[name], value]
662
else:
663
tags[name].append(value)
@@ -711,7 +711,7 @@ def _make_tag_file(bag_info_path, bag_info):
711
headers.sort()
712
with open(bag_info_path, 'w') as f:
713
for h in headers:
714
- if type(bag_info[h]) == list:
+ if isinstance(bag_info[h], list):
715
for val in bag_info[h]:
716
f.write("%s: %s\n" % (h, val))
717
0 commit comments