Closed hugo-lyppens closed 5 years ago
Do you have repro steps? The password is read from keyring at login.
https://github.com/edmundmok/mealpy/blob/6eddaac973abb737d64c378994b9e6fa10ce7ea8/mealpy.py#L54
I did not realize it reads from the keyring in two places. I still think it is nicer to remember the keyring password in PASSWORD under if USE_KEYRING: instead of throwing the information away. Up to you whether you want to adopt this suggestion as I see it will work as-is. Thanks for a great script. Worked for me today.
That would cache the PASSWORD
. If this script is used as a daily scheduled task and I change my password, I would need to stop the running daemon, to reload the updated credentials. We discuss this a bit in https://github.com/edmundmok/mealpy/pull/16#discussion_r272912572.
A note, the implementation you see is very short-term, interim solution. It will change once we have cli arguments (#16) and can have a separate options to set keyring password. Then the main flow never needs to request password, it'll always use keyring.get_password
.
Fix main thus, otherwise it does not get the password from the keyring: if name == 'main': EMAIL = load_config()['email_address']