Package: system-config-printer / 1.5.11-4

0003-Use-ValueError-instead-of-ImportError-to-catch-excep.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Laurent Bigonville <bigon@bigon.be>
Date: Mon, 26 Feb 2018 11:17:22 +0100
Subject: Use ValueError instead of ImportError to catch exception when
 importing GIR bindings

When importing specific version of GIR bindings, the ValueError
exception is raised instead of ImportError.

This should make libsecret optional as intended

Fixes: #94
---
 jobviewer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jobviewer.py b/jobviewer.py
index 6d9309f..16b2030 100644
--- a/jobviewer.py
+++ b/jobviewer.py
@@ -57,7 +57,7 @@ try:
     gi.require_version('Secret', '1')
     from gi.repository import Secret
     USE_SECRET=True
-except ImportError:
+except ValueError:
     USE_SECRET=False
 
 import gettext