Browse Source

Create client config paths when necesary

master
Lauri Võsandi 1 year ago
parent
commit
3332c36629
  1. 5
      pinecrypt/client/cli.py

5
pinecrypt/client/cli.py

@ -52,7 +52,10 @@ class ConfigTreeParser(ConfigParser): @@ -52,7 +52,10 @@ class ConfigTreeParser(ConfigParser):
@click.argument("authority")
def certidude_provision(authority):
client_config = ConfigParser()
os.makedirs(os.path.dirname(const.CLIENT_CONFIG_PATH))
try:
os.makedirs(os.path.dirname(const.CLIENT_CONFIG_PATH))
except FileExistsError:
pass
if os.path.exists(const.CLIENT_CONFIG_PATH):
client_config.read_file(open(const.CLIENT_CONFIG_PATH))
if client_config.has_section(authority):

Loading…
Cancel
Save