diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-02-06 21:49:11 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-02-06 21:49:11 +0000 |
commit | b79bbf852add9ff1ff09138ea35488b26cc7bdb7 (patch) | |
tree | 25849821c71d0a5b9bd5f6f1f0ae517d9d8b450e /partErrors.py | |
parent | 2d28d0e04d2e943aa21c745b5eb9c54b986e46f9 (diff) | |
download | anaconda-b79bbf852add9ff1ff09138ea35488b26cc7bdb7.tar.gz anaconda-b79bbf852add9ff1ff09138ea35488b26cc7bdb7.tar.xz anaconda-b79bbf852add9ff1ff09138ea35488b26cc7bdb7.zip |
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
Diffstat (limited to 'partErrors.py')
-rw-r--r-- | partErrors.py | 35 |
1 files changed, 35 insertions, 0 deletions
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 <msw@redhat.com> +# Jeremy Katz <katzj@redhat.com> +# Mike Fulbright <msf@redhat.com> +# +# 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 + |