Skip to content

Commit

Permalink
re.split() requires non-empty match
Browse files Browse the repository at this point in the history
Change from a * to a +, so long as there is something to split on, it
will split.

Fixes this warning:

FutureWarning: split() requires a non-empty pattern match.
  return _compile(pattern, flags).split(string, maxsplit)
  • Loading branch information
digitalresistor committed Jul 20, 2016
1 parent 47b7855 commit a0cc269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyramid/scripts/proutes.py
Expand Up @@ -296,7 +296,7 @@ def proutes_file_config(self, filename):
items = config.items('proutes')
for k, v in items:
if 'format' == k:
cols = re.split(r'[,|\s|\n]*', v)
cols = re.split(r'[,|\s\n]+', v)
self.column_format = [x.strip() for x in cols]

except configparser.NoSectionError:
Expand Down

0 comments on commit a0cc269

Please sign in to comment.