introduce py.builtin._tryimport to try importing modules in a row, fix a few places

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-09-04 19:08:10 +02:00
parent 32e2bf7d08
commit 1e51844519
11 changed files with 34 additions and 39 deletions

View File

@@ -1,10 +1,7 @@
try:
import Queue as queue
except ImportError:
import queue
import py
from py.__.code.code import FormattedExcinfo, ReprExceptionInfo
queue = py.builtin._tryimport('queue', 'Queue')
class TWMock:
def __init__(self):