diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2016-07-19 15:57:26 -0600 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2016-07-20 14:39:24 -0600 |
| commit | a0cc269f90f5ac0e6f95e337009e26b144090650 (patch) | |
| tree | af8b6d1da7ba4215baac47f90640ffb92f3a3f58 | |
| parent | 47b7855e0081fcac8b4cc71829b8193181939c2e (diff) | |
| download | pyramid-a0cc269f90f5ac0e6f95e337009e26b144090650.tar.gz pyramid-a0cc269f90f5ac0e6f95e337009e26b144090650.tar.bz2 pyramid-a0cc269f90f5ac0e6f95e337009e26b144090650.zip | |
re.split() requires non-empty match
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)
| -rw-r--r-- | pyramid/scripts/proutes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyramid/scripts/proutes.py b/pyramid/scripts/proutes.py index 19d91cc72..f75810c06 100644 --- a/pyramid/scripts/proutes.py +++ b/pyramid/scripts/proutes.py @@ -296,7 +296,7 @@ class PRoutesCommand(object): 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: |
