From 993bf7b2044c89f7071b58e7e5870552c67d371d Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Wed, 30 Apr 2014 17:04:14 +0200 Subject: [PATCH] Properly register password from prompt Whenever the password field is missing from the conf, gertty prompts the user to enter it but hapilly discard it to a local variable. Set the config password field instead. Change-Id: Idf6ea2edd9396e4e635955519af6739106fbfe3c --- gertty/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gertty/config.py b/gertty/config.py index 9ae342f..71be6f8 100644 --- a/gertty/config.py +++ b/gertty/config.py @@ -37,8 +37,8 @@ class Config(object): self.url = self.config.get(server, 'url') self.username = self.config.get(server, 'username') if not self.config.has_option(server, 'password'): - password = getpass.getpass("Password for %s (%s): " - % (self.url, self.username)) + self.password = getpass.getpass("Password for %s (%s): " + % (self.url, self.username)) else: self.password = self.config.get(server, 'password') if self.config.has_option(server, 'verify_ssl'):