Skip to content

Commit

Permalink
plugins: raise a PluginError when PyFilePlugin fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Exirel committed Apr 24, 2019
1 parent 5d27b09 commit a3ea8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sopel/plugins/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import os

from sopel import loader
from . import exceptions

try:
from importlib import reload
Expand Down Expand Up @@ -283,8 +284,7 @@ def __init__(self, filename):
name = os.path.basename(filename)
module_type = imp.PKG_DIRECTORY
else:
# TODO: throw more specific exception
raise Exception('Invalid Sopel plugin: %s' % filename)
raise exceptions.PluginError('Invalid Sopel plugin: %s' % filename)

self.filename = filename
self.path = filename
Expand Down

0 comments on commit a3ea8ba

Please sign in to comment.