
Removes unused files from services directory Change-Id: Ia3a5332da334a9a31db69afcedd5e14693e51d07
26 lines
612 B
Python
Executable File
26 lines
612 B
Python
Executable File
import logging
|
|
import os
|
|
|
|
from pecan.commands import CommandRunner
|
|
from pecan import make_app
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def setup_app(config):
|
|
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'])
|