diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-04-16 01:38:40 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-04-16 01:38:40 +0000 |
commit | 863ac44b74cd66f7d289748816d65c65808c149b (patch) | |
tree | 8536f8a72110b9996cb9e6746b6bb4cf3cb73733 /Lib/warnings.py | |
parent | c86c1b88f96ec48e5502b9b8ba5cc833f57ce476 (diff) | |
download | cpython-git-863ac44b74cd66f7d289748816d65c65808c149b.tar.gz |
Whitespace normalization.
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r-- | Lib/warnings.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py index 7966a33737..c3c9ecaf8f 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -13,7 +13,7 @@ def warn(message, category=None, stacklevel=1): """Issue a warning, or maybe ignore it or raise an exception.""" # Check if message is already a Warning object if isinstance(message, Warning): - category = message.__class__ + category = message.__class__ # Check category argument if category is None: category = UserWarning @@ -53,11 +53,11 @@ def warn_explicit(message, category, filename, lineno, if registry is None: registry = {} if isinstance(message, Warning): - text = str(message) - category = message.__class__ + text = str(message) + category = message.__class__ else: - text = message - message = category(message) + text = message + message = category(message) key = (text, category, lineno) # Quick test for common case if registry.get(key): |