Skip to content

Commit cceb993

Browse files
committed
Update code
1 parent 0430c8f commit cceb993

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/aem/azext_aem/custom.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def _enable_new(self):
142142
self._extension = aem_extension_info_v2[self._os_type]
143143

144144
new_identity = None
145-
vm_identity = self._vm.get('identity')
146-
if vm_identity is None:
145+
vm_identity = self._vm.get('identity', {})
146+
if vm_identity is None or vm_identity == {}:
147147
logger.info("VM has no identity, enabling system assigned")
148148
new_identity = IDENTITY_SYSTEM_ASSIGNED
149149

@@ -167,7 +167,6 @@ def _enable_new(self):
167167
command_args['mi_system_assigned'] = 'True'
168168
if new_identity == IDENTITY_SYSTEM_USER_ASSIGNED:
169169
command_args['mi_user_assigned'] = user_assigned
170-
print(command_args)
171170

172171
poller = VMPatch(cli_ctx=self._cmd.cli_ctx)(command_args=command_args)
173172
self._vm = LongRunningOperation(self._cmd.cli_ctx)(poller)

0 commit comments

Comments
 (0)