Skip to content

Commit

Permalink
Don't mess with warnings or call resetwarnings! It
Browse files Browse the repository at this point in the history
breaks -Wignore.
  • Loading branch information
Jim Fulton committed Apr 18, 2006
1 parent 63d5ce4 commit 5450ae0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions browser/metaconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def skin(_context, name=None, interface=None, layers=None):
"""Provides a new skin.
First, let's ignore the warnigns:
>>> warnings.filterwarnings('ignore', category=DeprecationWarning)
>>> showwarning = warnings.showwarning
>>> warnings.showwarning = lambda *a, **k: None
>>> import pprint
>>> class Info(object):
Expand Down Expand Up @@ -283,7 +284,7 @@ def skin(_context, name=None, interface=None, layers=None):
ConfigurationError: You must specify the 'name' or 'interface' attribute.
Enabling the warnings again:
>>> warnings.resetwarnings()
>>> warnings.showwarning = showwarning
"""
if name is None and interface is None:
raise ConfigurationError(
Expand Down

0 comments on commit 5450ae0

Please sign in to comment.