summaryrefslogtreecommitdiff
path: root/poezio/plugin_manager.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-10-13 00:47:21 +0200
committermathieui <mathieui@mathieui.net>2017-10-13 00:47:21 +0200
commit69f29969adcd97db8a1ab54ef2bbd5ec7f29a07e (patch)
treec106337fda6d4fbf2312d3ffb0ecb96e8d351f11 /poezio/plugin_manager.py
parentbbfb834827a47195d1907674399ff18685be4fb9 (diff)
downloadpoezio-69f29969adcd97db8a1ab54ef2bbd5ec7f29a07e.tar.gz
poezio-69f29969adcd97db8a1ab54ef2bbd5ec7f29a07e.tar.bz2
poezio-69f29969adcd97db8a1ab54ef2bbd5ec7f29a07e.tar.xz
poezio-69f29969adcd97db8a1ab54ef2bbd5ec7f29a07e.zip
Improve some bare or redundant excepts
Diffstat (limited to 'poezio/plugin_manager.py')
-rw-r--r--poezio/plugin_manager.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/poezio/plugin_manager.py b/poezio/plugin_manager.py
index 9e2a8084..8499cf51 100644
--- a/poezio/plugin_manager.py
+++ b/poezio/plugin_manager.py
@@ -266,17 +266,13 @@ class PluginManager(object):
completion function that completes the name of the plugins, from
all .py files in plugins_dir
"""
- try:
- names = set()
- for path_ in self.load_path:
- try:
- add = set(os.listdir(path_))
- names |= add
- except:
- pass
- except OSError as e:
- self.core.information('Completion failed: %s' % e, 'Error')
- return False
+ names = set()
+ for path_ in self.load_path:
+ try:
+ add = set(os.listdir(path_))
+ names |= add
+ except OSError:
+ pass
plugins_files = [name[:-3] for name in names if name.endswith('.py')
and name != '__init__.py' and not name.startswith('.')]
plugins_files.sort()