From d5576d84733a92fd4237da0ba871c6efe8e7a3c6 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 4 Oct 2017 05:06:54 +0200 Subject: hgwebfs: simplify retry loop construction --- sys/lib/python/hgext/hgwebfs.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/lib/python') diff --git a/sys/lib/python/hgext/hgwebfs.py b/sys/lib/python/hgext/hgwebfs.py index 91a98adde..430269cf1 100644 --- a/sys/lib/python/hgext/hgwebfs.py +++ b/sys/lib/python/hgext/hgwebfs.py @@ -6,11 +6,10 @@ import os 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 @@ class Webconn: raise e if os.spawnl(os.P_WAIT, "/boot/factotum", "getkey", "-g", params) != 0: raise e - loop = True except: raise e -- cgit v1.2.3