Revert "Simplify setting filler password" (#767)

This commit is contained in:
samuel-w 2021-01-19 02:12:13 -06:00 committed by GitHub
parent 9b88c15a22
commit a876aeda3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -71,7 +71,11 @@ class BorgThread(QtCore.QThread, BackupProfileMixin):
if 'additional_env' in params:
env = {**env, **params['additional_env']}
env['BORG_PASSPHRASE'] = params.get('password', '9999999') # Set dummy password to avoid prompt.
password = params.get('password')
if password is not None:
env['BORG_PASSPHRASE'] = password
else:
env['BORG_PASSPHRASE'] = '9999999' # Set dummy password to avoid prompt.
if env.get('BORG_PASSCOMMAND', False):
env.pop('BORG_PASSPHRASE', None) # Unset passphrase