Skip to content

Commit

Permalink
fix: Ignore empty names
Browse files Browse the repository at this point in the history
They were raising runtime errors as if they are undefined, but there aren't
  • Loading branch information
RaistGH authored Apr 25, 2023
1 parent fe99dde commit 2e6912d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vcardlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ def select_most_relevant_name(names):
longuest_length = 0
pos = 0
for name in names:
if not name:
if name == "":
continue
else:
raise TypeError("parameter 'names[" + str(pos) + "]' is undefined")
length = len_without_parenth_or_braces(name)
# longuer
Expand Down

0 comments on commit 2e6912d

Please sign in to comment.