From 13bad0da9efbd38ca288e7f28f9512649473f6ce Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Wed, 14 Jan 2015 11:55:45 -0500
Subject: [PATCH 7/7] Put new _ped constants and functions into the parted
module.
We don't want to require users of pyparted to have to dig down into the
lower level bindings to get at these things.
---
src/parted/__init__.py | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/src/parted/__init__.py b/src/parted/__init__.py
index c8f6830..2d9ea32 100644
--- a/src/parted/__init__.py
+++ b/src/parted/__init__.py
@@ -2,7 +2,7 @@
# __init__.py
# Python bindings for libparted (built on top of the _ped Python module).
#
-# Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
+# Copyright (C) 2007-2015 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
@@ -48,6 +48,9 @@ from _ped import TimerException
from _ped import UnknownDeviceException
from _ped import UnknownTypeException
+from _ped import register_exn_handler
+from _ped import clear_exn_handler
+
from alignment import Alignment
from constraint import Constraint
from device import Device
@@ -122,6 +125,29 @@ from _ped import DISK_GPT_PMBR_BOOT
from _ped import DISK_TYPE_EXTENDED
from _ped import DISK_TYPE_PARTITION_NAME
+from _ped import EXCEPTION_TYPE_INFORMATION
+from _ped import EXCEPTION_TYPE_WARNING
+from _ped import EXCEPTION_TYPE_ERROR
+from _ped import EXCEPTION_TYPE_FATAL
+from _ped import EXCEPTION_TYPE_BUG
+from _ped import EXCEPTION_TYPE_NO_FEATURE
+
+from _ped import EXCEPTION_RESOLVE_UNHANDLED
+from _ped import EXCEPTION_RESOLVE_FIX
+from _ped import EXCEPTION_RESOLVE_YES
+from _ped import EXCEPTION_RESOLVE_NO
+from _ped import EXCEPTION_RESOLVE_OK
+from _ped import EXCEPTION_RESOLVE_RETRY
+from _ped import EXCEPTION_RESOLVE_IGNORE
+from _ped import EXCEPTION_RESOLVE_CANCEL
+
+from _ped import EXCEPTION_OPT_OK_CANCEL
+from _ped import EXCEPTION_OPT_YES_NO
+from _ped import EXCEPTION_OPT_YES_NO_CANCEL
+from _ped import EXCEPTION_OPT_IGNORE_CANCEL
+from _ped import EXCEPTION_OPT_RETRY_CANCEL
+from _ped import EXCEPTION_OPT_RETRY_IGNORE_CANCEL
+
from decorators import localeC
partitionTypesDict = {
--
2.4.0