From 6e44dbd24b6edb7fbcfe3b6127b1dc075180955e Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 8 Sep 2009 21:06:56 -0400 Subject: Allow for searching of keys with no specific one set --- rpmbuild-remote.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rpmbuild-remote.py') diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py index c2aedd7..a8360f1 100644 --- a/rpmbuild-remote.py +++ b/rpmbuild-remote.py @@ -35,9 +35,7 @@ def get_parser(): help="The remote machine to use (defined in config file)") parser.add_option("-k", "--ssh-key", action="store", type="string", dest="ssh_key", - default=os.path.join(home, ".ssh/id_rsa") - help="The private SSH key to use to login. " - "[Default: ~/.ssh/id_rsa]") + help="The private SSH key to use to login.") parser.add_option("-u", "--user", action="store", type="string", dest="user", default=os.getlogin(), @@ -96,7 +94,8 @@ def read_preferences(options): if 'user' not in system: system['user'] = options.user if 'ssh_key' not in system: - system['ssh_key'] = options.ssh_key + if not options.ssh_key is None: + system['ssh_key'] = options.ssh_key if 'host' not in system: if options.host is None: LOG.error("Host not set") -- cgit