Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Improve error message when no di.yml is found, or di.yml is empty #8

Open
tcwalther opened this issue Feb 12, 2018 · 1 comment
Open
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@tcwalther
Copy link

Currently, when running without a di.yml file, one gets the following error. Since this will be a common thing, the output should probably be a bit more user-friendly.

$> di build                                                                                                               ⏎
Traceback (most recent call last):
  File "/Users/tw/miniconda3/bin/di", line 11, in <module>
    load_entry_point('docker-interface==0.2.6', 'console_scripts', 'di')()
  File "/Users/tw/miniconda3/lib/python3.5/site-packages/docker_interface/cli.py", line 33, in entry_point
    configuration = base.apply(configuration, None, args)
  File "/Users/tw/miniconda3/lib/python3.5/site-packages/docker_interface/plugins/base.py", line 246, in apply
    "missing configuration; could not find configuration file '%s'" % args.file)
FileNotFoundError: missing configuration; could not find configuration file 'di.yml'

Equally, when the di.yml is empty, the output currently is:

$> di build                                                                                                                 ⏎
Traceback (most recent call last):
  File "/Users/tw/miniconda3/bin/di", line 11, in <module>
    load_entry_point('docker-interface==0.2.7', 'console_scripts', 'di')()
  File "/Users/tw/miniconda3/lib/python3.5/site-packages/docker_interface/cli.py", line 33, in entry_point
    configuration = base.apply(configuration, None, args)
  File "/Users/tw/miniconda3/lib/python3.5/site-packages/docker_interface/plugins/base.py", line 247, in apply
    configuration['workspace'] = os.path.join(dirname, configuration.get('workspace', '.'))
AttributeError: 'NoneType' object has no attribute 'get'
@tcwalther tcwalther added the enhancement New feature or request label Feb 12, 2018
@stale
Copy link

stale bot commented Sep 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant