Skip to content

Commit 0ccd3b2

Browse files
committed
libversion: fix handling of trailing commas
1 parent 1e9f216 commit 0ccd3b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/libversion.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,10 @@ def parse_requirement(requirement):
328328
splitted = specs_s.split(",")
329329
specs = []
330330
for vs in splitted:
331+
if vs == "":
332+
# for some weird reasons, sometimes a trailing ',' is
333+
# included in the requirement list.
334+
continue
331335
cmp_end = re.search(version_cmp, vs).end()
332336
c, v = vs[:cmp_end], vs[cmp_end:]
333337
specs.append((c, v))

0 commit comments

Comments
 (0)