diff options
author | Claudiu Popa <devnull@localhost> | 2014-09-30 19:19:25 +0300 |
---|---|---|
committer | Claudiu Popa <devnull@localhost> | 2014-09-30 19:19:25 +0300 |
commit | 4954d6ac7287bb0c68d54401ad42c42c010ad60a (patch) | |
tree | 94c6cec9da9664e42c14df8cbdff5d3ebb2ecc4d /checkers/strings.py | |
parent | b27aad76b7942e905f6338cb819698029a92fd5e (diff) | |
download | pylint-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.py | 2 |
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 |