Archived
1
0

added absolute path to reading sources.cfg

This commit is contained in:
RTB 2014-06-17 20:55:28 +02:00
parent 9542262bf7
commit d657f9420f

View File

@ -1,7 +1,7 @@
import ConfigParser
from scrapy.utils.project import get_project_settings
import os
class Configurator:
"""
@ -66,8 +66,11 @@ class Configurator:
variables for sources
:return a ConfigParser object of sources.cfg
"""
current_dir = os.path.dirname(os.path.abspath(__file__))
config_path = current_dir + '\..\sources.cfg'
# [TODO]: location of sources.cfg should be softcoded eventually
config = ConfigParser.ConfigParser()
config.read('sources.cfg') # [TODO]: should be softcoded eventually
config.read(config_path)
return config
@staticmethod