Skip to content

Commit

Permalink
Improve error message for duplicate items
Browse files Browse the repository at this point in the history
  • Loading branch information
florianschanda committed Jun 20, 2023
1 parent 9fe8a0e commit 1f7fc23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lobster/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ def lobster_read(mh, filename, level, items, source_info=None):

if item.tag.key() in items:
mh.error(item.location,
"duplicate definition, "
"duplicate definition of %s, "
"previously defined at %s" %
items[item.tag.key()].location.to_string())
(item.tag.key(),
items[item.tag.key()].location.to_string()))

if source_info is not None:
item.perform_source_checks(source_info)
Expand Down

0 comments on commit 1f7fc23

Please sign in to comment.