dag/vlasisku — pull request #5 by ento (2012-07-12 16:17:19+00:00)
Title: Load database gracefully to allow running manage commands w/o a database.

Without this fix, ``manage.py updatedb`` (or any other manage.py command, for that matter) fails to run [1] when there is no database file.

Change summary:

* vlasisku package loads successfully even if no database file can be found.
* If no database file was found, vlasisku.app returns 503 upon request.
* updatedb command runs without db.pickle being present.

[1] Traceback:

```
$ python manage.py updatedb
Traceback (most recent call last):
File "manage.py", line 8, in
from vlasisku import app
File "/path/to/vlasisku/vlasisku/__init__.py", line 10, in
database.init_app(app)
File "/path/to/vlasisku/vlasisku/database.py", line 137, in init_app
root = Root(self)
File "/path/to/vlasisku/vlasisku/database.py", line 188, in __init__
with open(join(root_path, jbovlaste)) as f:
IOError: [Errno 2] No such file or directory: '/path/to/vlasisku/vlasisku/data/jbovlaste.xml'
```