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
|
t = 0
|
||||||
while True:
|
while True:
|
||||||
if t > 150:
|
if t < 150:
|
||||||
break
|
t += 1
|
||||||
try:
|
try:
|
||||||
manager.get_vm(self.kwargs.get('pk'))
|
manager.get_vm(self.kwargs.get('pk'))
|
||||||
except BaseException:
|
except BaseException:
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
sleep(2)
|
||||||
else:
|
else:
|
||||||
sleep(2)
|
break
|
||||||
|
|
||||||
response['status'] = True
|
response['status'] = True
|
||||||
response['redirect'] = self.get_success_url()
|
response['redirect'] = self.get_success_url()
|
||||||
|
|
Loading…
Reference in a new issue