From 223ee5a5f54a8f80558cff5b811b8c33e661ef2f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 20 Jul 2021 09:41:46 +0100 Subject: [PATCH] Tidying --- daemon.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/daemon.py b/daemon.py index d92b69bac..0ffb27640 100644 --- a/daemon.py +++ b/daemon.py @@ -4235,16 +4235,13 @@ class PubServer(BaseHTTPRequestHandler): actorChanged = True # change password - if fields.get('password'): - if len(fields['password']) > 2: - if fields.get('passwordconfirm'): - if fields['password'] == \ - fields['passwordconfirm']: - # set password - pwd = fields['password'] - storeBasicCredentials(baseDir, - nickname, - pwd) + if fields.get('password') and \ + fields.get('passwordconfirm'): + if len(fields['password']) > 2 and \ + fields['password'] == fields['passwordconfirm']: + # set password + storeBasicCredentials(baseDir, nickname, + fields['password']) # change city if fields.get('cityDropdown'):