summaryrefslogtreecommitdiff
path: root/pylint/test/functional/duplicate_except.py
blob: c68cf7a24be16344925390022fee25ce0482c103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
"""Test for duplicate-check."""

def main():
    """The second ValueError should be flagged."""
    try:
        raise ValueError('test')
    except ValueError:
        return 1
    except ValueError:  # [duplicate-except]
        return 2
    except (OSError, TypeError):
        return 3