Skip to content

Commit 31bf589

Browse files
committed
Some fixes to plugins
1 parent 516ba4f commit 31bf589

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
# v2.13.1
8+
9+
### Fixed
10+
- Reading `requirements.txt` files in plugins
11+
12+
713
# v2.13.0
814

915
### Added

bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.13.0'
25+
__version__ = '2.13.1'
2626

2727
import asyncio
2828
import traceback

cogs/plugins.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ async def load_plugin(self, username, repo, plugin_name):
7979
dirname = f'plugins/{username}-{repo}/{plugin_name}'
8080
if 'requirements.txt' in os.listdir(dirname):
8181
# Install PIP requirements
82+
print(dirname + '/' + 'requirements.txt')
8283
try:
8384
await self.bot.loop.run_in_executor(
8485
None, self._asubprocess_run,
8586
f'python3 -m pip install -U -r {dirname}/'
86-
'requirements.txt --user -q -q'
87+
'requirements.txt -q -q'
8788
)
8889
# -q -q (quiet)
8990
# so there's no terminal output unless there's an error

cogs/utility.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def format_cog_help(self, ctx, cog):
5858
if fmt == '':
5959
continue
6060
embed = Embed(
61-
description='*' + inspect.getdoc(cog) + '*',
61+
description='*' + (inspect.getdoc(cog) or 'No description') + '*',
6262
color=self.bot.main_color
6363
)
6464

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ natural==0.2.0
88
dnspython~=1.16.0 # required by motor
99
parsedatetime==2.4 # to be replaced by dateparser
1010
aiohttp<3.5 # to comply with discord.py
11-
pylint # for style
11+
pylint # for style

0 commit comments

Comments
 (0)