Skip to content

Commit

Permalink
Be more consistent with extend vs +=
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Sep 17, 2024
1 parent 848662c commit fe12a81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ops/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3656,10 +3656,10 @@ def secret_set(
elif 'expire' in self._secret_cache[id]:
args.extend(['--expire', self._secret_cache[id]['expire'].isoformat()])
if rotate is not None:
args += ['--rotate', rotate.value]
args.extend(['--rotate', rotate.value])
self._secret_cache[id]['rotate'] = rotate
elif 'rotate' in self._secret_cache[id]:
args += ['--rotate', self._secret_cache[id]['rotate'].value]
args.extend(['--rotate', self._secret_cache[id]['rotate'].value])

if content is not None:
# Don't store the actual secret content in memory, but put a sentinel there to indicate
Expand Down Expand Up @@ -3695,9 +3695,9 @@ def secret_add(
if expire is not None:
args.extend(['--expire', expire.isoformat()])
if rotate is not None:
args += ['--rotate', rotate.value]
args.extend(['--rotate', rotate.value])
if owner is not None:
args += ['--owner', owner]
args.extend(['--owner', owner])
with tempfile.TemporaryDirectory() as tmp:
# The content has already been validated with Secret._validate_content
for k, v in content.items():
Expand Down

0 comments on commit fe12a81

Please sign in to comment.