Blob Blame History Raw
From 91b72ed3c71dbe1fe6a475f412b9290ebfb6e9c5 Mon Sep 17 00:00:00 2001
From: Vratislav Podzimek <vpodzime@redhat.com>
Date: Tue, 17 May 2016 11:41:53 +0200
Subject: [PATCH 02/13] Also catch data_fetch.DataFetchError when trying to get
 content

Otherwise everything crashes and a traceback is shown to the user instead of a
dialog (TUI) or proper error message (cmdline mode).

Resolves: rhbz#1263239
---
 org_fedora_oscap/ks/oscap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org_fedora_oscap/ks/oscap.py b/org_fedora_oscap/ks/oscap.py
index df92018..5c29d4a 100644
--- a/org_fedora_oscap/ks/oscap.py
+++ b/org_fedora_oscap/ks/oscap.py
@@ -413,7 +413,7 @@ class OSCAPdata(AddonData):
             # content not available/fetched yet
             try:
                 self._fetch_content_and_initialize()
-            except common.OSCAPaddonError as e:
+            except (common.OSCAPaddonError, data_fetch.DataFetchError) as e:
                 log.error("Failed to fetch and initialize SCAP content!")
                 msg = _("There was an error fetching and loading the security content:\n" +
                         "%s\n" +
-- 
2.5.5