Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 471b3a2

Browse files
author
yufeizhao
committed
update
1 parent defd82d commit 471b3a2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/util/plugin_util.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ def get_plugins(plugin_type):
1111
if plugin_path not in sys.path:
1212
sys.path.insert(0, plugin_path)
1313
for file_name in file_list:
14-
if ".py" in file_name:
14+
if file_name.endswith(".py"):
1515
if file_name == "__init__.py":
1616
continue
17-
if ".pyc" in file_name:
18-
continue
1917
module_name = f"app.plugin.{plugin_type}.{file_name[:-3]}"
2018
plugin = __import__(module_name, globals(), locals(), ["run", "__plugin__"])
2119
plugins[plugin.__plugin__] = plugin.run

0 commit comments

Comments
 (0)