Skip to content

Commit

Permalink
remove calls to warnings module, use log module instead
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Oct 4, 2009
1 parent 1b6a01b commit 41e8d5f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions stdeb/util.py
Expand Up @@ -8,7 +8,6 @@
import stdeb
import pkg_resources
from stdeb import log, __version__ as __stdeb_version__
import warnings

if hasattr(os,'link'):
link_func = os.link
Expand Down Expand Up @@ -649,8 +648,8 @@ def __init__(self,

if len(xs_python_version)==0:
# No Python version specified. For now, just use default Python
warnings.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'current\'')
log.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'current\'')
xs_python_version = ['current']
else:

Expand All @@ -675,17 +674,17 @@ def __init__(self,

default_vers = pyversions.default_version(version_only=True)
if default_vers in vers:
warnings.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'current\'')
log.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'current\'')
xs_python_version = ['current']
else:
vers.sort()
warnings.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'%s\''%vers[-1])
log.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'%s\''%vers[-1])
xs_python_version = [vers[-1]]
elif 'all' in pyversions_result:
warnings.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'current\'')
log.warn('working around Debian #548392, changing '
'XS-Python-Version: to \'current\'')
xs_python_version = ['current']

if len(xs_python_version)!=0:
Expand Down

0 comments on commit 41e8d5f

Please sign in to comment.