Skip to content

Commit

Permalink
Rename usage of conf to config
Browse files Browse the repository at this point in the history
  • Loading branch information
brwyatt committed Dec 1, 2019
1 parent 9fcc904 commit 259bad2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/ophiuchus/cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def __call__(
*args,
**kwargs,
):
conf = GlobalConfig(endpoints=dict(additional_endpoints)) # noqa: F841
config = GlobalConfig( # noqa: F841
endpoints=dict(additional_endpoints),
)

self.log.info(f"Cleaning old artifacts dir: {artifacts_base_dir}")
rmtree(artifacts_base_dir)
Expand Down
10 changes: 5 additions & 5 deletions src/ophiuchus/cli/runlocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def wrapper(request):

async def start_site(
site_group: str,
conf: GlobalConfig,
config: GlobalConfig,
address: str = "127.0.0.1",
port: int = 3000,
allow_unsupported_routes: bool = False,
Expand All @@ -83,7 +83,7 @@ async def start_site(
for handler_name, handler_class in load_entry_points(
site_group, Handler,
).items():
handler = handler_class(conf)
handler = handler_class(config)
for route, verb in itertools.product(
routes[f"{handler_class.__module__}.{handler_class.__name__}"],
[
Expand Down Expand Up @@ -181,7 +181,7 @@ def __call__(
*args,
**kwargs,
) -> int:
conf = GlobalConfig(endpoints=dict(additional_endpoints))
config = GlobalConfig(endpoints=dict(additional_endpoints))
loop = asyncio.get_event_loop()

port = first_listen_port
Expand All @@ -190,13 +190,13 @@ def __call__(
loop.create_task(
start_site(
site_group,
conf,
config,
address=listen_address,
port=port,
allow_unsupported_routes=allow_unsupported_routes,
),
)
conf.add_endpoint(site_group, f"http://{listen_address}:{port}")
config.add_endpoint(site_group, f"http://{listen_address}:{port}")
port += 1

try:
Expand Down

0 comments on commit 259bad2

Please sign in to comment.