summarylogtreecommitdiffstats
path: root/0007-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
blob: 3a93ab22fa8a864738e19c98edbec81a2a7979f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marko Lemmetty <marko.lemmetty@jollamobile.com>
Date: Fri, 15 May 2020 15:44:22 +0300
Subject: [PATCH] Trap any kind of exception during plugin parsing (eg IOError
 for a dangling symlink)

---
 osc/commandline.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osc/commandline.py b/osc/commandline.py
index eb5cf45c6b605874f0ac512c0e62a13fee17dc5e..8d046122dfeea90255fb25348f5281c41b227294 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
@@ -10144,7 +10144,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
                         if (inspect.isfunction(data) and inspect.getmodule(data) == mod
                                 or inspect.ismodule(data)):
                             setattr(self.__class__, name, data)
-                except (SyntaxError, NameError, ImportError) as e:
+                except (SyntaxError, NameError, ImportError, IOError) as e:
                     if os.environ.get('OSC_PLUGIN_FAIL_IGNORE'):
                         print(f"{os.path.join(plugin_dir, extfile)}: {e}\n", file=sys.stderr)
                     else: