Skip to content

Commit a7ef7ff

Browse files
committed
Merge remote-tracking branch 'origin/master' into edge
2 parents 3c830f1 + ea0d4e9 commit a7ef7ff

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mig/shared/install.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -418,17 +418,17 @@ def generate_confs(
418418
expanded = dict(locals())
419419

420420
# expand any directory path specific as "auto" relative to CWD
421-
if source is keyword_auto:
421+
if source == keyword_auto:
422422
expanded['source'] = os.path.dirname(sys.argv[0])
423423
source = expanded['source']
424-
if destination is keyword_auto:
424+
if destination == keyword_auto:
425425
expanded['destination'] = os.path.dirname(sys.argv[0])
426426
destination = expanded['destination']
427427

428428
# expand any user information marked as "auto" based on the environment
429-
if user is keyword_auto:
429+
if user == keyword_auto:
430430
user = pwd.getpwuid(os.getuid())[0]
431-
if group is keyword_auto:
431+
if group == keyword_auto:
432432
group = grp.getgrgid(os.getgid())[0]
433433

434434
# finalize a destination path up-front
@@ -941,7 +941,7 @@ def generate_confs(
941941
prio_duplicati_protocols.append('davs')
942942
user_dict['__DUPLICATI_PROTOCOLS__'] = ' '.join(prio_duplicati_protocols)
943943

944-
if timezone is keyword_auto:
944+
if timezone == keyword_auto:
945945
# attempt to detect the timezone
946946
sys_timezone = None
947947
try:
@@ -963,11 +963,11 @@ def generate_confs(
963963

964964
user_dict['__SEAFILE_TIMEZONE__'] = timezone
965965

966-
if seafile_secret is keyword_auto:
966+
if seafile_secret == keyword_auto:
967967
seafile_secret = ensure_native_string(base64.b64encode(os.urandom(32))).lower()
968968
user_dict['__SEAFILE_SECRET_KEY__'] = seafile_secret
969969

970-
if seafile_ccnetid is keyword_auto:
970+
if seafile_ccnetid == keyword_auto:
971971
seafile_ccnetid = ensure_native_string(base64.b64encode(os.urandom(20))).lower()
972972
user_dict['__SEAFILE_CCNET_ID__'] = seafile_ccnetid
973973

@@ -1732,12 +1732,12 @@ def generate_confs(
17321732
default_https_port])
17331733
user_dict['__SID_URL__'] += ':%(__SID_PORT__)s' % user_dict
17341734

1735-
if digest_salt is keyword_auto:
1735+
if digest_salt == keyword_auto:
17361736
# Generate random hex salt for scrambling saved digest credentials
17371737
digest_salt = ensure_native_string(base64.b16encode(os.urandom(16)))
17381738
user_dict['__DIGEST_SALT__'] = digest_salt
17391739

1740-
if crypto_salt is keyword_auto:
1740+
if crypto_salt == keyword_auto:
17411741
# Generate random hex salt for various crypto helpers
17421742
crypto_salt = ensure_native_string(base64.b16encode(os.urandom(16)))
17431743
user_dict['__CRYPTO_SALT__'] = crypto_salt

0 commit comments

Comments
 (0)