[PATCH] A different approach to disks that do not support names.

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

 



---
 src/pydisk.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/pydisk.c b/src/pydisk.c
index 5fac23f..1c70f63 100644
--- a/src/pydisk.c
+++ b/src/pydisk.c
@@ -1013,6 +1013,11 @@ PyObject *py_ped_partition_get_name(_ped_Partition *s, PyObject *args) {
         return NULL;
     }
 
+    if (!ped_disk_type_check_feature (part->disk->type, PED_DISK_TYPE_PARTITION_NAME)) {
+        /* This means that names are not supported.  Lets return None. */
+        return Py_None;
+    }
+
     if (part) {
         ret = (char *) ped_partition_get_name(part);
         if (ret == NULL) {
-- 
1.6.0.6

_______________________________________________
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