From 07d4dd734778ab58847edb3e2e4215bec5fc8a07 Mon Sep 17 00:00:00 2001 From: Jake Zaia Date: Fri, 12 Oct 2018 20:54:30 -0400 Subject: [PATCH] Fix small bug involving home directory location --- src/config_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config_manager.py b/src/config_manager.py index 842d99b..d96f2f9 100644 --- a/src/config_manager.py +++ b/src/config_manager.py @@ -7,15 +7,15 @@ Manages SSH config files, and supports a more user-friendly terminal based way o import os -#This is the location of where the SSH -SSH_CONFIG_FILE_LOC = '~/.ssh/config' +#This is the location of where the SSH +SSH_CONFIG_FILE_LOC = os.path.expanduser('~/.ssh/config') def config_exists(): """ Checks if an SSH config file exists at the desired path """ - return os.path.exists(SSH_CONFIG_FILE_LOC) + return os.path.isfile(SSH_CONFIG_FILE_LOC) def get_config(): """ @@ -45,7 +45,7 @@ def create_config(): port = input("Port number: ") else: port = None - + #SSH public key location is optional identityfile = input("Would you like to specify an ssh public key location?(y/N)") if (identityfile == 'y' or identityfile == 'Y' or identityfile.lower() =='yes'):