summaryrefslogtreecommitdiff
path: root/Lib/warnings.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-15 03:34:38 +0000
committerTim Peters <tim.peters@gmail.com>2001-01-15 03:34:38 +0000
commite119006e7dc0df0a5ff6b60764b2ce3cd9477688 (patch)
treeb4c578be7bff079625b7cdc36abb1d4f0b46d8fa /Lib/warnings.py
parentb90f89a496676ec714e111a747344600f3988496 (diff)
downloadcpython-git-e119006e7dc0df0a5ff6b60764b2ce3cd9477688.tar.gz
Whitespace normalization. Top level of Lib now fixed-point for reindent.py!
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r--Lib/warnings.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py
index 31d4ad1119..9763dc67af 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):