diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-10-04 05:06:54 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-10-04 05:06:54 +0200 |
commit | d5576d84733a92fd4237da0ba871c6efe8e7a3c6 (patch) | |
tree | 2a0bb1da2ee9939ed518e7c8d2ce0043ca8648ad | |
parent | b12763136e0169485da2a910127cea27353dd17b (diff) | |
download | plan9front-d5576d84733a92fd4237da0ba871c6efe8e7a3c6.tar.xz |
hgwebfs: simplify retry loop construction
-rw-r--r-- | sys/lib/python/hgext/hgwebfs.py | 6 |
1 files changed, 2 insertions, 4 deletions
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 |