This commit is contained in:
Kovid Goyal 2011-04-19 14:18:28 -06:00
parent 1206cb3304
commit e776b5b1f6
2 changed files with 5 additions and 2 deletions

View File

@ -4,8 +4,7 @@ __copyright__ = '2008, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import uuid, sys, os, re, logging, time, random, \
__builtin__, warnings, multiprocessing
from contextlib import closing
__builtin__, warnings
from urllib import getproxies
from urllib2 import unquote as urllib2_unquote
__builtin__.__dict__['dynamic_property'] = lambda(func): func(None)
@ -383,6 +382,7 @@ class StreamReadWrapper(object):
def detect_ncpus():
"""Detects the number of effective CPUs in the system"""
import multiprocessing
ans = -1
try:
ans = multiprocessing.cpu_count()
@ -547,6 +547,7 @@ def get_download_filename(url, cookie_file=None):
'''
Get a local filename for a URL using the content disposition header
'''
from contextlib import closing
filename = ''
br = browser()

View File

@ -875,6 +875,8 @@ OptionRecommendation(name='sr3_replace',
if self.opts.verbose:
self.log.filter_level = self.log.DEBUG
self.flush()
import cssutils, logging
cssutils.log.setLevel(logging.WARN)
if self.opts.debug_pipeline is not None:
self.opts.verbose = max(self.opts.verbose, 4)