Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Nov 14, 2019
1 parent 2dda821 commit c7471e4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions codemeta/codemeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ def parsepython(data, packagename, mapping=None, with_entrypoints=False, orcid_p
det = " :: " if key != "programmingLanguage" else " "
value = det.join(fields[1:])
if key in data:
if not any( x.strip() == value for x in data[key].split(",") ):
data[key] += ", " + value
if isinstance(data[key],str):
if not any( x.strip() == value for x in data[key].split(",") ):
data[key] += ", " + value
elif isinstance(data[key],list):
if value not in data[key]:
data[key].append(value)
else:
data[key] = value
elif fields[0].lower() in mapping[CWKey.PYPI]:
Expand Down

0 comments on commit c7471e4

Please sign in to comment.