Skip to content

Commit

Permalink
- Use stacklevel=2 to show calling site
Browse files Browse the repository at this point in the history
  • Loading branch information
sidnei committed Oct 10, 2008
1 parent cf5822e commit 0597122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion __init__.py
Expand Up @@ -56,7 +56,7 @@ def upgradeException(t, v):

warnings.warn('String exceptions are deprecated starting '
'with Python 2.5 and will be removed in a '
'future release', DeprecationWarning)
'future release', DeprecationWarning, stacklevel=2)

n = None
if __builtins__.has_key(t):
Expand Down

0 comments on commit 0597122

Please sign in to comment.