Re: [PATCH] Handle system crappyness.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just one complaint:

> diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py
> index 3eaeb0f..4c354e1 100644
> --- a/storage/formats/__init__.py
> +++ b/storage/formats/__init__.py
> @@ -254,7 +254,10 @@ class DeviceFormat(object):
>              os.write(fd, buf)
>              os.close(fd)
>          except Exception, e:
> -            log.error("error zeroing out %s: %s" % (self.device, e))
> +            if e.errno == 28: # No space left in device
> +                pass
> +            else:
> +                log.error("error zeroing out %s: %s" % (self.device, e))

If you're going to assume the exception has an errno attribute you
should do it in a separate except block for OSError (or IOError or
whatever it is). 

Dave


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux