← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~paride/curtin:fix-dasd-device_id-range into curtin:master

 

Review: Needs Fixing

The code change is correct, the Commit message above is not, we accept 0 -> 0xffff (inclusive)

The < 65535  failed for value of 0xffff (65535).


Diff comments:

> diff --git a/curtin/block/dasd.py b/curtin/block/dasd.py
> index 682f9d3..0307bcc 100644
> --- a/curtin/block/dasd.py
> +++ b/curtin/block/dasd.py
> @@ -269,7 +269,7 @@ def _valid_device_id(device_id):
>      if not (0 <= int(dsn, 16) < 256):
>          raise ValueError("device_id invalid: dsn not in 0-255: '%s'" % dsn)
>  
> -    if not (0 <= int(dev.lower(), 16) < 65535):
> +    if not (0 <= int(dev.lower(), 16) <= 65535):
>          raise ValueError(
>              "device_id invalid: devno not in 0-0x10000: '%s'" % dev)

Let's update the message: devno not in 0-0xffff

>  


-- 
https://code.launchpad.net/~paride/curtin/+git/curtin/+merge/389594
Your team curtin developers is requested to review the proposed merge of ~paride/curtin:fix-dasd-device_id-range into curtin:master.


References