#49 fix development setup
Merged by ralph. Opened by mjia.
mjia/waiverdb issue41  into  master

Download 49.patch

This fixes three issues when setting up the development server by running `DEV=true python runapp.py':

  • ImportError: No module named systemd.journal
  • warnings about fedmsg.crypto
  • Unable to load configuration file, the same issue in #PR48

rebased

But we already have this switcheroo in load_config, why do we need to repeat it here?

Because load_config will try to load the default file from conf/settings.py which doesn't exist. We probably should not load the config file for dev and test env.

But if DEV=true is set in the environment then load_config will load os.getcwd() + '/conf/settings.py' which should always exist... so I don't understand what the problem is?

What exactly are you running and what config exactly fails to load?

os.getcwd() + '/conf/settings.py does not exist in the dev environment as we only have settings.py.example in the source tree. Do you think we should always have conf/settings.py
including settings for a dev environment?

Oh sorry I though we had conf/settings.py committed. I see the problem now.

So runapp.py is only for a dev server, right? We don't run tests against it and we don't use it in the systemd service or anything.

Could we rename it to run-dev-server.py and just unconditionally use the DevelopmentConfig object?

Then we don't need to tell people they have to remember to pass DEV-true as well.

Yeah, good idea.

rebased

Rebased to address the comments.

Pull-Request has been merged by ralph

Metadata