-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Following up the discussion on #301: create_ssh_config() as well as __create_and_save_key() methods would simply fail if our ssh configuration directory (which we typically expect to be ~/work/fabric_config/, but it could be elsewhere as well) does not exist.
fabrictestbed-extensions/fabrictestbed_extensions/fablib/fablib.py
Lines 798 to 805 in 00a072c
| dir_path = os.path.dirname(bastion_ssh_config_file) | |
| if not os.path.exists(dir_path): | |
| msg = ( | |
| f"Directory {dir_path} does not exist, can not create ssh_config file!" | |
| ) | |
| print(msg) | |
| logging.error(msg) | |
| raise Exception(msg) |
We could instead attempt to create the directory with os.mkdirs(dir_path) or pathlib.Path(dir_path).mkdir(parents=True).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels