shithub: riscv

Download patch

ref: d5576d84733a92fd4237da0ba871c6efe8e7a3c6
parent: b12763136e0169485da2a910127cea27353dd17b
author: cinap_lenrek <[email protected]>
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