DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

parse the config file before passing to create server #368

Closed mintbridge closed 8 years ago

mintbridge commented 8 years ago

at the moment running the server with uwsgi doesnt work as it passes the string path to the server instead of the config object, it fails with:

Traceback (most recent call last):
  File "/Documents/cubes/cubes/server/app.py", line 13, in <module>
    application = create_server(CONFIG_PATH)
  File "/Documents/cubes/cubes/server/base.py", line 38, in create_server
    if config.has_option("server", "modules"):
AttributeError: 'str' object has no attribute 'has_option'

this PR matches the behaviour of the slicer command https://github.com/DataBrewery/cubes/blob/master/cubes/slicer/commands.py#L59