]> git.cworth.org Git - turbot/blobdiff - turbot/interaction.py
Drop leading/trailing spaces and empty strings when parsing rounds
[turbot] / turbot / interaction.py
index d8a252b316d13363d45950adf8b8ad2169f1ba17..e6aadb62269d7b7b8912eeab5d8d8d4bc236a3d3 100644 (file)
@@ -466,6 +466,11 @@ def puzzle_submission(turb, payload, metadata):
     # Add any new rounds to the database
     if new_rounds:
         for round in new_rounds.split(','):
+            # Drop any leading/trailing spaces from the round name
+            round = round.strip()
+            # Ignore any empty string
+            if not len(round):
+                continue
             rounds.append(round)
             turb.table.put_item(
                 Item={