Commit 8ec0ce68f79f0e737bf4fc710a41e8726b468a2e
1 parent
42abd933
Exists in
master
Improve robustness of input addresses reading.
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
flaskr/controllers/main_controller.py
@@ -131,6 +131,9 @@ def gather_addresses(from_list, from_file): | @@ -131,6 +131,9 @@ def gather_addresses(from_list, from_file): | ||
131 | else: | 131 | else: |
132 | addresses = from_list.replace("\r", '').split("\n") | 132 | addresses = from_list.replace("\r", '').split("\n") |
133 | 133 | ||
134 | + # Remove empty lines (if any) | ||
135 | + addresses = [a for a in addresses if a] | ||
136 | + | ||
134 | return "\n".join(addresses) | 137 | return "\n".join(addresses) |
135 | 138 | ||
136 | 139 |