When syntribos is installed in a environment, fresh for the first time and there is no config file, no `.syntribos` directory and no virtual environment, if a user runs `syntribos` , the tool throws an error:
ERROR:syntribos.config:[Errno 2] No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/syntribos/runner.py", line 130, in setup_config
default_config_files=[ENV.get_default_conf_file()])
File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 89, in get_default_conf_file
return get_syntribos_path(FILE)
File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 84, in get_syntribos_path
return os.path.abspath(os.path.join(get_syntribos_root(), *args))
File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 70, in get_syntribos_root
home_root = get_user_home_root()
File "/usr/local/lib/python2.7/dist-packages/syntribos/utils/env.py", line 45, in get_user_home_root
user = os.getlogin() or os.environ.get("USER")
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/usr/local/bin/syntribos", line 10, in <module>
sys.exit(entry_point())
File "/usr/local/lib/python2.7/dist-packages/syntribos/runner.py", line 404, in entry_point
Runner.run()
File "/usr/local/lib/python2.7/dist-packages/syntribos/runner.py", line 172, in run
if CONF.sub_command.name == "init":
File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 3163, in __getattr__
return getattr(self._conf._namespace, name)
AttributeError: 'NoneType' object has no attribute 'sub_command'
Fix proposed to branch: master /review. openstack. org/396367
Review: https:/