summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-08-06 22:18:30 +0000
committerMatt Wilson <msw@redhat.com>2001-08-06 22:18:30 +0000
commit85eb29d4a76193b4e29cd4aae3cada855e82e311 (patch)
tree494b76230eb8190272d882fd156a756a4b2161d3
parentdc96bbe7abb5fa207325edd1e138e606a0fcc70c (diff)
downloadanaconda-85eb29d4a76193b4e29cd4aae3cada855e82e311.tar.gz
anaconda-85eb29d4a76193b4e29cd4aae3cada855e82e311.tar.xz
anaconda-85eb29d4a76193b4e29cd4aae3cada855e82e311.zip
if our only option is to cancel, don't bother showing the dialog, we'll need to catch the exception in our code anyway and we can just display the error there. (#51048)
-rwxr-xr-xgui.py4
-rw-r--r--text.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/gui.py b/gui.py
index 66f782e37..cfd387159 100755
--- a/gui.py
+++ b/gui.py
@@ -90,6 +90,10 @@ def processEvents():
mainiteration (FALSE)
def partedExceptionWindow(exc):
+ # if our only option is to cancel, let us handle the exception
+ # in our code and avoid popping up the exception window here.
+ if exc.options == parted.EXCEPTION_CANCEL:
+ return parted.EXCEPTION_UNHANDLED
print exc.type_string
print exc.message
print exc.options
diff --git a/text.py b/text.py
index 2da2d2016..350aac492 100644
--- a/text.py
+++ b/text.py
@@ -270,6 +270,10 @@ class InstallInterface:
return None
def partedExceptionWindow(self, exc):
+ # if our only option is to cancel, let us handle the exception
+ # in our code and avoid popping up the exception window here.
+ if exc.options == parted.EXCEPTION_CANCEL:
+ return parted.EXCEPTION_UNHANDLED
buttons = []
buttonToAction = {}
flags = ((parted.EXCEPTION_FIX, N_("Fix")),