Re: [PATCH] Make a top level StorageError that all others are based on.

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

 



Looks good.

On 04/02/2009 04:44 PM, David Lehman wrote:
---
  storage/errors.py |   48 ++++++++++++++++++++++++++++++++++++------------
  1 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/storage/errors.py b/storage/errors.py
index d2d35ee..a23b572 100644
--- a/storage/errors.py
+++ b/storage/errors.py
@@ -1,6 +1,30 @@
+# errors.py
+# Exception classes for anaconda's storage configuration module.
+#
+# Copyright (C) 2009  Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# the GNU General Public License v.2, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY expressed or implied, including the implied warranties of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+# Public License for more details.  You should have received a copy of the
+# GNU General Public License along with this program; if not, write to the
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
+# source code or documentation are not subject to the GNU General Public
+# License and may only be used or replicated with the express permission of
+# Red Hat, Inc.
+#
+# Red Hat Author(s): Dave Lehman<dlehman@xxxxxxxxxx>
+#
+
+class StorageError(Exception):
+    pass

  # Device
-class DeviceError(Exception):
+class DeviceError(StorageError):
      pass

  class DeviceCreateError(DeviceError):
@@ -22,7 +46,7 @@ class DeviceUserDeniedFormatError(DeviceError):
      pass

  # DeviceFormat
-class DeviceFormatError(Exception):
+class DeviceFormatError(StorageError):
      pass

  class FormatCreateError(DeviceFormatError):
@@ -62,7 +86,7 @@ class SwapSpaceError(DeviceFormatError):
      pass

  # devicelibs
-class SwapError(Exception):
+class SwapError(StorageError):
      pass

  class SuspendError(SwapError):
@@ -71,35 +95,35 @@ class SuspendError(SwapError):
  class OldSwapError(SwapError):
      pass

-class MDRaidError(Exception):
+class MDRaidError(StorageError):
      pass

-class DMError(Exception):
+class DMError(StorageError):
      pass

-class LVMError(Exception):
+class LVMError(StorageError):
      pass

-class CryptoError(Exception):
+class CryptoError(StorageError):
      pass

  # DeviceTree
-class DeviceTreeError(Exception):
+class DeviceTreeError(StorageError):
      pass

  # DeviceAction
-class DeviceActionError(Exception):
+class DeviceActionError(StorageError):
      pass

  # partitioning
-class PartitioningError(Exception):
+class PartitioningError(StorageError):
      pass

-class PartitioningWarning(Exception):
+class PartitioningWarning(StorageError):
      pass

  # udev
-class UdevError(Exception):
+class UdevError(StorageError):
      pass




--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
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