Commit a2407f02 authored by Lucas Felix's avatar Lucas Felix
Browse files

Display yaml errors outside tmux if session name is not found

parent 71f4fe32
......@@ -165,13 +165,18 @@ def main():
sys.exit(0)
# check beacon connection
static.get_config()
config = static.get_config()
# Start a specific session
if arguments["--session"]:
session_name = arguments["--session"]
if session_name not in get_sessions_list():
print(("'%s' does not seem to be a valid session, exiting." % session_name))
print(f"\n'{session_name}' does not seem to be a valid session, ", end="")
if config.invalid_yaml_files:
print("it may relate to the following yaml error(s):")
config.parsing_report()
else:
print("exiting.")
print_sessions_list(get_sessions_list())
sys.exit(0)
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment