mirror of https://github.com/scrapy/scrapy.git
restored code removed in r118. there's nothing wrong with that code
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40120
This commit is contained in:
parent
c97c495d16
commit
67ee6bff2e
|
|
@ -20,7 +20,13 @@ class Settings(object):
|
|||
self.core = self._import('scrapy.conf.core_settings')
|
||||
|
||||
def _import(self, modulepath):
|
||||
return __import__(modulepath, {}, {}, [''])
|
||||
try:
|
||||
return __import__(modulepath, {}, {}, [''])
|
||||
except ImportError:
|
||||
import sys
|
||||
err = "Error: Can't find %s module in your python path\n"
|
||||
sys.stderr.write(err % modulepath)
|
||||
sys.exit(1)
|
||||
|
||||
def __getitem__(self, opt_name):
|
||||
if opt_name in self.overrides:
|
||||
|
|
|
|||
Loading…
Reference in New Issue