@@ -418,17 +418,17 @@ def generate_confs(
418
418
expanded = dict (locals ())
419
419
420
420
# expand any directory path specific as "auto" relative to CWD
421
- if source is keyword_auto :
421
+ if source == keyword_auto :
422
422
expanded ['source' ] = os .path .dirname (sys .argv [0 ])
423
423
source = expanded ['source' ]
424
- if destination is keyword_auto :
424
+ if destination == keyword_auto :
425
425
expanded ['destination' ] = os .path .dirname (sys .argv [0 ])
426
426
destination = expanded ['destination' ]
427
427
428
428
# expand any user information marked as "auto" based on the environment
429
- if user is keyword_auto :
429
+ if user == keyword_auto :
430
430
user = pwd .getpwuid (os .getuid ())[0 ]
431
- if group is keyword_auto :
431
+ if group == keyword_auto :
432
432
group = grp .getgrgid (os .getgid ())[0 ]
433
433
434
434
# finalize a destination path up-front
@@ -941,7 +941,7 @@ def generate_confs(
941
941
prio_duplicati_protocols .append ('davs' )
942
942
user_dict ['__DUPLICATI_PROTOCOLS__' ] = ' ' .join (prio_duplicati_protocols )
943
943
944
- if timezone is keyword_auto :
944
+ if timezone == keyword_auto :
945
945
# attempt to detect the timezone
946
946
sys_timezone = None
947
947
try :
@@ -963,11 +963,11 @@ def generate_confs(
963
963
964
964
user_dict ['__SEAFILE_TIMEZONE__' ] = timezone
965
965
966
- if seafile_secret is keyword_auto :
966
+ if seafile_secret == keyword_auto :
967
967
seafile_secret = ensure_native_string (base64 .b64encode (os .urandom (32 ))).lower ()
968
968
user_dict ['__SEAFILE_SECRET_KEY__' ] = seafile_secret
969
969
970
- if seafile_ccnetid is keyword_auto :
970
+ if seafile_ccnetid == keyword_auto :
971
971
seafile_ccnetid = ensure_native_string (base64 .b64encode (os .urandom (20 ))).lower ()
972
972
user_dict ['__SEAFILE_CCNET_ID__' ] = seafile_ccnetid
973
973
@@ -1732,12 +1732,12 @@ def generate_confs(
1732
1732
default_https_port ])
1733
1733
user_dict ['__SID_URL__' ] += ':%(__SID_PORT__)s' % user_dict
1734
1734
1735
- if digest_salt is keyword_auto :
1735
+ if digest_salt == keyword_auto :
1736
1736
# Generate random hex salt for scrambling saved digest credentials
1737
1737
digest_salt = ensure_native_string (base64 .b16encode (os .urandom (16 )))
1738
1738
user_dict ['__DIGEST_SALT__' ] = digest_salt
1739
1739
1740
- if crypto_salt is keyword_auto :
1740
+ if crypto_salt == keyword_auto :
1741
1741
# Generate random hex salt for various crypto helpers
1742
1742
crypto_salt = ensure_native_string (base64 .b16encode (os .urandom (16 )))
1743
1743
user_dict ['__CRYPTO_SALT__' ] = crypto_salt
0 commit comments