while loop code formating
This commit is contained in:
parent
8393afe141
commit
a1a90ed5d0
1 changed files with 9 additions and 7 deletions
|
@ -968,14 +968,16 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
# )
|
||||
t = 0
|
||||
while True:
|
||||
if t > 150:
|
||||
break
|
||||
if t < 150:
|
||||
t += 1
|
||||
try:
|
||||
manager.get_vm(self.kwargs.get('pk'))
|
||||
except BaseException:
|
||||
break
|
||||
else:
|
||||
sleep(2)
|
||||
else:
|
||||
break
|
||||
|
||||
response['status'] = True
|
||||
response['redirect'] = self.get_success_url()
|
||||
|
|
Loading…
Reference in a new issue