Add a pwad_path property and also convert the iwad_path method to a property.
This commit is contained in:
parent
5881c94c11
commit
b14c12c609
3 changed files with 12 additions and 7 deletions
|
@ -2,6 +2,7 @@ import dcc.config
|
|||
import tomlkit
|
||||
from tomlkit.toml_file import TOMLFile
|
||||
|
||||
|
||||
class Configure(dcc.config.Base):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
|
@ -11,7 +12,7 @@ class Configure(dcc.config.Base):
|
|||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
new_config = self.pwads.joinpath(parsed_args.wad).joinpath(self.config_name)
|
||||
new_config = self.pwad_path.joinpath(self.config_name)
|
||||
if new_config.exists():
|
||||
raise Exception("Config %s already exists.".format(new_config))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue