summaryrefslogtreecommitdiff
path: root/checkers/strings.py
diff options
context:
space:
mode:
authorClaudiu Popa <devnull@localhost>2014-09-30 19:19:25 +0300
committerClaudiu Popa <devnull@localhost>2014-09-30 19:19:25 +0300
commit4954d6ac7287bb0c68d54401ad42c42c010ad60a (patch)
tree94c6cec9da9664e42c14df8cbdff5d3ebb2ecc4d /checkers/strings.py
parentb27aad76b7942e905f6338cb819698029a92fd5e (diff)
downloadpylint-4954d6ac7287bb0c68d54401ad42c42c010ad60a.tar.gz
Move the string parsing inside the try body.
It seems that _formatter_parser raises ValueError on PyPy, while on CPython it raises the error only when iterating the result.
Diffstat (limited to 'checkers/strings.py')
-rw-r--r--checkers/strings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkers/strings.py b/checkers/strings.py
index 318393d..5eb151f 100644
--- a/checkers/strings.py
+++ b/checkers/strings.py
@@ -145,8 +145,8 @@ def collect_string_fields(format_string):
"""
formatter = string.Formatter()
- parseiterator = formatter.parse(format_string)
try:
+ parseiterator = formatter.parse(format_string)
for result in parseiterator:
if all(item is None for item in result[1:]):
# not a replacement format