File no-last-flag-check.patch of Package python-parted
Description: Remove *_LAST_FLAG checks
The last flag in an enumeration is not really part of the ABI. Checking it
here means that changes to parted may unexpectedly break pyparted.
Author: Colin Watson <cjwatson@debian.org>
Reviewed-by: Herbert Parentes Fortes Neto <hpfn@ig.com.br>
Bug-Debian: http://bugs.debian.org/697588
Last-Update: 2014-11-30
--- a/src/pydisk.c
+++ b/src/pydisk.c
@@ -1020,7 +1020,7 @@
return NULL;
}
- if ((flag < PED_DISK_FIRST_FLAG) || (flag > PED_DISK_LAST_FLAG)) {
+ if ((flag < PED_DISK_FIRST_FLAG)) {
PyErr_SetString(PyExc_ValueError, "Invalid flag provided.");
return NULL;
}
@@ -1404,7 +1404,7 @@
return NULL;
}
- if ((flag < PED_PARTITION_FIRST_FLAG) || (flag > PED_PARTITION_LAST_FLAG)) {
+ if ((flag < PED_PARTITION_FIRST_FLAG)) {
PyErr_SetString(PyExc_ValueError, "Invalid flag provided.");
return NULL;
}