Do not always import module used only in debug mode

This commit is contained in:
Florent 2014-07-08 20:03:00 +02:00
commit 8a2a1ece5e
6 changed files with 7 additions and 7 deletions

View file

@ -25,7 +25,6 @@ import optparse
from optparse import OptionGroup, OptionParser
import os
import sys
import tempfile
import warnings
from weboob.capabilities.base import ConversionWarning, BaseObject
@ -361,6 +360,7 @@ class BaseApplication(object):
handlers = []
if self.options.save_responses:
import tempfile
responses_dirname = tempfile.mkdtemp(prefix='weboob_session_')
print('Debug data will be saved in this directory: %s' % responses_dirname, file=sys.stderr)
log_settings['save_responses'] = True