Attempt to create Size instance from another Size instance should work and result in creation of a copy.
Related: rhbz#1077179 --- blivet/size.py | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/blivet/size.py b/blivet/size.py index 74198cc..61dae94 100644 --- a/blivet/size.py +++ b/blivet/size.py @@ -196,6 +196,8 @@ class Size(Decimal): if bytes is not None: if isinstance(bytes, (int, long, float, Decimal)): value = Decimal(bytes) + elif isinstance(bytes, Size): + value = Decimal(bytes.convertTo("b")) else: raise ValueError("invalid value for bytes param") elif spec: