diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-15 03:34:38 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-15 03:34:38 (GMT) |
commit | e119006e7dc0df0a5ff6b60764b2ce3cd9477688 (patch) | |
tree | b4c578be7bff079625b7cdc36abb1d4f0b46d8fa /Lib/warnings.py | |
parent | b90f89a496676ec714e111a747344600f3988496 (diff) | |
download | cpython-e119006e7dc0df0a5ff6b60764b2ce3cd9477688.zip cpython-e119006e7dc0df0a5ff6b60764b2ce3cd9477688.tar.gz cpython-e119006e7dc0df0a5ff6b60764b2ce3cd9477688.tar.bz2 |
Whitespace normalization. Top level of Lib now fixed-point for reindent.py!
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r-- | Lib/warnings.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py index 31d4ad1..9763dc6 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -131,29 +131,29 @@ def _processoptions(args): # Helper for _processoptions() def _setoption(arg): - parts = arg.split(':') - if len(parts) > 5: - raise _OptionError("too many fields (max 5): %s" % `arg`) - while len(parts) < 5: - parts.append('') - action, message, category, module, lineno = [s.strip() - for s in parts] - action = _getaction(action) - message = re.escape(message) - category = _getcategory(category) - module = re.escape(module) - if module: - module = module + '$' - if lineno: - try: - lineno = int(lineno) - if lineno < 0: - raise ValueError - except (ValueError, OverflowError): - raise _OptionError("invalid lineno %s" % `lineno`) - else: - lineno = 0 - filterwarnings(action, message, category, module, lineno) + parts = arg.split(':') + if len(parts) > 5: + raise _OptionError("too many fields (max 5): %s" % `arg`) + while len(parts) < 5: + parts.append('') + action, message, category, module, lineno = [s.strip() + for s in parts] + action = _getaction(action) + message = re.escape(message) + category = _getcategory(category) + module = re.escape(module) + if module: + module = module + '$' + if lineno: + try: + lineno = int(lineno) + if lineno < 0: + raise ValueError + except (ValueError, OverflowError): + raise _OptionError("invalid lineno %s" % `lineno`) + else: + lineno = 0 + filterwarnings(action, message, category, module, lineno) # Helper for _setoption() def _getaction(action): |