get gid of warning message from pkg_resources.

,----
| /usr/lib/python2.7/site-packages/zope/__init__.py:3: UserWarning: Module bottle was already imported from /home/ralf/local/lib/python2.7/site-packages/pypiserver/bottle.pyc, but /home/ralf/.local/lib/python2.7/site-packages is being added to sys.path
|   import pkg_resources
`----
This commit is contained in:
Ralf Schmitt 2011-07-29 03:32:43 +02:00
parent c2db6f0c0b
commit d956f7ce67
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,12 @@
"""minimal PyPI like server for use with pip/easy_install"""
import os, sys, getopt, mimetypes
try:
# get rid of "UserWarning: Module bottle was already imported from..."
import pkg_resources
except ImportError:
pass
from pypiserver import bottle, __version__
sys.modules["bottle"] = bottle