Nicholas Jones 747480367b Enable pep8 checks
Enables excluded pep8 checks and fixes existing the related errors

Change-Id: Ib3a909d79b9726567c1cebf5881d1878d91ee052
2017-08-01 09:49:28 -05:00

27 lines
658 B
Python
Executable File

import os
import logging
from pecan import make_app
from pecan.commands import CommandRunner
from uuidgen import model
logger = logging.getLogger(__name__)
def setup_app(config):
model.init_model()
app_conf = dict(config.app)
app = make_app(app_conf.pop('root'),
logging=getattr(config, 'logging', {}),
**app_conf)
logger.info('Starting uuidgen...')
return app
def main():
dir_name = os.path.dirname(__file__)
drive, path_and_file = os.path.splitdrive(dir_name)
path, filename = os.path.split(path_and_file)
runner = CommandRunner()
runner.run(['serve', path+'/config.py'])