summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2016-07-19 15:57:26 -0600
committerBert JW Regeer <bertjw@regeer.org>2016-07-20 14:39:24 -0600
commita0cc269f90f5ac0e6f95e337009e26b144090650 (patch)
treeaf8b6d1da7ba4215baac47f90640ffb92f3a3f58
parent47b7855e0081fcac8b4cc71829b8193181939c2e (diff)
downloadpyramid-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.py2
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: