On Tue, Jun 19, 2012 at 08:11:25PM -0400, Will Woods wrote: > + count = 0 > + while maxretry > 0: > + try: > + rv = check_call(umount) > + except CalledProcessError: > + count += 1 > + if count == maxretry: > + raise > + logger.warn("failed to unmount %s. retrying (%d/%d)...", > + mnt, count, maxretry) > + if logger.getEffectiveLevel() <= logging.DEBUG: > + fuser = check_output(["fuser", "-vm", mnt], > + stderr=STDOUT) > + logger.debug("fuser -vm:\n%s\n", fuser) > + sleep(retrysleep) > + else: > + break The loop condition is a bit odd, since maxretry is never updated. It looks like it will work fine, but might be clearer if it was just a 'while True' or 'while count < maxretry' -- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
Attachment:
pgpt6C6b0LKaC.pgp
Description: PGP signature
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list