From b79bbf852add9ff1ff09138ea35488b26cc7bdb7 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 6 Feb 2002 21:49:11 +0000 Subject: stage 1 of the partitioning.py cleanup effort -- 1) move the following functions from partitioning.py -> partedUtils.py get_flags, start_sector_to_cyl, end_sector_to_cyl, start_cyl_to_sector, end_cyl_to_sector, getPartSize, getPartSizeMB, getDeviceSizeMB, get_partition_by_name, get_partition_name, get_partition_file_system_type, set_partition_file_system_type, get_partition_drive, map_foreign_to_fsname, filter_partitions, get_logical_partitions, get_primary_partitions, get_raid_partitions, get_lvm_partitions, 2) move PartitioningError and PartitioningWarning classes from partitioning.py -> partErrors.py Change everything that depends on these functions to use the new location --- partErrors.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 partErrors.py (limited to 'partErrors.py') diff --git a/partErrors.py b/partErrors.py new file mode 100644 index 000000000..ed05bda35 --- /dev/null +++ b/partErrors.py @@ -0,0 +1,35 @@ +# +# partErrors.py: partitioning error exceptions +# +# Matt Wilson +# Jeremy Katz +# Mike Fulbright +# +# Copyright 2001 Red Hat, Inc. +# +# This software may be freely redistributed under the terms of the GNU +# library public license. +# +# You should have received a copy of the GNU Library Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +"""Exceptions for use in partitioning.""" + + +class PartitioningError: + """A critical error which must be resolved to continue the installation.""" + def __init__ (self, value): + self.value = value + + def __str__ (self): + return self.value + +class PartitioningWarning: + """A warning which may be ignored and still complete the installation.""" + def __init__ (self, value): + self.value = value + + def __str__ (self): + return self.value + -- cgit