hgwebfs: simplify retry loop construction
This commit is contained in:
parent
b12763136e
commit
d5576d8473
1 changed files with 2 additions and 4 deletions
|
@ -6,11 +6,10 @@ import os
|
||||||
|
|
||||||
class Webconn:
|
class Webconn:
|
||||||
def __init__(self, mnt, req):
|
def __init__(self, mnt, req):
|
||||||
loop = True
|
while True:
|
||||||
while loop:
|
|
||||||
loop = False
|
|
||||||
try:
|
try:
|
||||||
self.open(mnt, req)
|
self.open(mnt, req)
|
||||||
|
return
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
try:
|
try:
|
||||||
errstr = e.strerror
|
errstr = e.strerror
|
||||||
|
@ -19,7 +18,6 @@ class Webconn:
|
||||||
raise e
|
raise e
|
||||||
if os.spawnl(os.P_WAIT, "/boot/factotum", "getkey", "-g", params) != 0:
|
if os.spawnl(os.P_WAIT, "/boot/factotum", "getkey", "-g", params) != 0:
|
||||||
raise e
|
raise e
|
||||||
loop = True
|
|
||||||
except:
|
except:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue