From 842dbf48c21dd3018838317396b7581525a2facc Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Mon, 21 Apr 2025 12:48:47 +0200 Subject: [PATCH] refs #1912 fix a couple of rc --- CHANGELOG.md | 6 ++++++ ogclient/lib/python3/DiskLib.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b783e4..75468e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.2] - 2025-04-21 + +### Fixed + +- Have the partitioning functions return a meaningful rc + ## [0.7.1] - 2025-04-15 ### Fixed diff --git a/ogclient/lib/python3/DiskLib.py b/ogclient/lib/python3/DiskLib.py index 7cb0c45..1213358 100644 --- a/ogclient/lib/python3/DiskLib.py +++ b/ogclient/lib/python3/DiskLib.py @@ -179,7 +179,7 @@ def ogCreatePartitions (disk, parts): p = subprocess.run (['sfdisk', DISK], input=sfdisk_input, capture_output=True, text=True) subprocess.run (['partprobe', DISK]) if CACHESIZE: CacheLib.ogMountCache() - return True + return not p.returncode #/** @@ -285,7 +285,7 @@ def ogCreateGptPartitions (disk, parts): p = subprocess.run (['sgdisk'] + DELOPTIONS + OPTIONS + [DISK], capture_output=True, text=True) subprocess.run (['partprobe', DISK]) if CACHESIZE: CacheLib.ogMountCache() - return True + return not p.returncode #/** -- 2.40.1