[blivet:rhel7/master 4/4] Fix comment on online_dasd (#1070115)
amulhern at redhat.com
Thu Sep 11 12:08:41 UTC 2014
----- Original Message -----
> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Thursday, September 11, 2014 5:15:15 AM
> Subject: Re: [blivet:rhel7/master 4/4] Fix comment on online_dasd (#1070115)
> On Mon, 2014-09-08 at 15:25 -0400, mulhern wrote:
> > Related: rhbz#1070115
> > online_dasd will not find the device unless the number is correctly
> > formatted,
> > on the other hand, if the number is not correctly formatted, it simply will
> > not
> > find the device.
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> > blivet/devicelibs/dasd.py | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> > diff --git a/blivet/devicelibs/dasd.py b/blivet/devicelibs/dasd.py
> > index b24add7..70ee748 100644
> > --- a/blivet/devicelibs/dasd.py
> > +++ b/blivet/devicelibs/dasd.py
> > @@ -135,9 +135,10 @@ def sanitize_dasd_dev_input(dev):
> > def online_dasd(dev):
> > """ Given a device number, switch the device to be online.
> > - :param dev: string representing a DASD device number; acceptable
> > formats
> > - include 0.0.abcd, 0.0.ABCD, abcd, ABCD, where 'abcd' are
> > - hexadecimal numbers.
> > + :param str dev: a string representing a DASD device number
> I think the original indentation was what we use more often.
> > +
> > + Raises a ValueError if the device with that number does not exist,
> > + is already online, or can not be put online.
> There is a ':raises:' field so we should use it instead.
> Vratislav Podzimek
> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
Until recently it seemed that if the :raises: field was used followed by
more than one line of text that the line would be cut in the middle and
result in funny formatting in the displayed docs. Consequently, if
I had more than one line about raising an exception I avoided the
:raises: markup. That doesn't seem to be true anymore, so I'll be
using :raises: without restriction in future.
More information about the anaconda-patches