Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit 744c272

Browse files
committed
Ptm now uses the correct config location for server commands.
Related to issue #29. `ptm server ...` commands used different default locations for the configuration file.
1 parent aaf674f commit 744c272

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytaskmanager/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def cli_server_start(name, config, environment, ip, port, debug, force_create):
140140
@click.option('-n', '--name', default='default', help='server instance to use')
141141
def cli_server_configlocation(name):
142142
"""Print the location of the default config file."""
143-
ctx = util.AppContext(APPNAME, 'server', name)
143+
# ctx = util.AppContext(APPNAME, 'server', name)
144+
ctx = util.ServerContext(APPNAME, 'default')
144145
cfg_filename = get_config_location(ctx, config=None, force_create=False)
145146
click.echo('{}'.format(cfg_filename))
146147

@@ -183,7 +184,8 @@ def cli_server_passwd(name, config, environment, password):
183184
def cli_server_load_fixtures(name, environment, config):
184185
"""Load fixtures for testing."""
185186
click.echo("Loading fixtures.")
186-
ctx = util.AppContext(APPNAME, 'server', name)
187+
# ctx = util.AppContext(APPNAME, 'server', name)
188+
ctx = util.ServerContext(APPNAME, 'default')
187189

188190
# Load configuration and initialize logging system
189191
cfg_filename = get_config_location(ctx, config, force_create=False)

0 commit comments

Comments
 (0)