Skip to content

Commit

Permalink
Merge pull request #17 from deoren/i16-value-error-not-enough-values
Browse files Browse the repository at this point in the history
get_events(): Replace "clever" code with a for loop
  • Loading branch information
deoren authored May 24, 2018
2 parents 21da35e + f22157a commit 8ca6d89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion automated_tickets_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,13 @@ def get_events(settings, event_schedule):
for event in mysql_cursor.fetchall():

# Prune whitespace from all fields
event = tuple([item.strip() if isinstance(item, str) else item for item in event])
# event = tuple([item.strip() else item for item in event])
fields = []
for field in event:
if isinstance(field, str):
field = field.strip()
fields.append(field)
event = tuple(fields)

# Collect a list of all events we need to take action for
events.append(Event(event))
Expand Down

0 comments on commit 8ca6d89

Please sign in to comment.