Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when the main configuration file of a command is empty #1

Open
fmenabe opened this issue Mar 21, 2019 · 0 comments
Open

Bug when the main configuration file of a command is empty #1

fmenabe opened this issue Mar 21, 2019 · 0 comments

Comments

@fmenabe
Copy link
Owner

fmenabe commented Mar 21, 2019

The main configuration file of a command is a YAML file (the file named after the leaf command; for example, conf/users/add.yml of the users add command) . This should be a dict as each key in the file is loaded as a configuration parameter to the module.

If the file is empty, the module crash with this exception:

  ...
  File "/tmp/test/env/lib/python3.7/site-packages/clg/conf/src.py", line 50, in init
    self.load_dir(conf_dir, clg.config, commands)
  File "/tmp/test/env/lib/python3.7/site-packages/clg/conf/src.py", line 97, in load_dir
    self.load_cmd_file(cmd_filepath)
  File "/tmp/test/env/lib/python3.7/site-packages/clg/conf/src.py", line 76, in load_cmd_file
    for param, value in conf.items():
AttributeError: 'NoneType' object has no attribute 'items'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant