ref: 70cd3e5f64350d5eab6ab33ddbb8abcb770f1aa0
parent: 3a4d608ac617d6bf4719846e8fa3f559d89f4b98
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Oct 4 01:06:54 EDT 2017
hgwebfs: simplify retry loop construction
--- a/sys/lib/python/hgext/hgwebfs.py
+++ b/sys/lib/python/hgext/hgwebfs.py
@@ -6,11 +6,10 @@
class Webconn:
def __init__(self, mnt, req):
- loop = True
- while loop:
- loop = False
+ while True:
try:
self.open(mnt, req)
+ return
except IOError, e:
try:
errstr = e.strerror
@@ -19,7 +18,6 @@
raise e
if os.spawnl(os.P_WAIT, "/boot/factotum", "getkey", "-g", params) != 0:
raise e
- loop = True
except:
raise e
--
⑨