Skip to content

Fail gracefully if repo does not exists #57

@Carreau

Description

@Carreau

Otherwise user get the error:

Traceback (most recent call last):
  File "/Users/bussonniermatthias/anaconda/bin/doctr", line 9, in <module>
    load_entry_point('doctr', 'console_scripts', 'doctr')()
  File "/Users/bussonniermatthias/dev/doctr/doctr/__main__.py", line 198, in main
    return process_args(get_parser())
  File "/Users/bussonniermatthias/dev/doctr/doctr/__main__.py", line 92, in process_args
    return args.func(args, parser)
  File "/Users/bussonniermatthias/dev/doctr/doctr/__main__.py", line 142, in configure
    encrypted_variable = encrypt_variable(b"DOCTR_DEPLOY_ENCRYPTION_KEY=" + key, repo=repo)
  File "/Users/bussonniermatthias/dev/doctr/doctr/local.py", line 44, in encrypt_variable
    public_key = r.json()['key']
KeyError: 'key'

Because r.status is not 200...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions