[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Handle trailing commas in Uploaders



Currently, a trailing comma means dak will include the empty string as
an uploader for the package, which is a common occurrence thanks to
wrap-and-sort -t. Instead we should just ignore these uploaders.
---
 daklib/textutils.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/daklib/textutils.py b/daklib/textutils.py
index b4646759..7e670f1c 100644
--- a/daklib/textutils.py
+++ b/daklib/textutils.py
@@ -117,4 +117,7 @@ def fix_maintainer(maintainer):
 def split_uploaders(field):
     import re
     for u in re.sub(">[ ]*,", ">\t", field).split("\t"):
-        yield u.strip()
+        u = u.strip()
+        # Trailing commas will give an empty final uploader
+        if u:
+            yield u
-- 
2.11.0


Reply to: