Skip to content

Commit f85e42e

Browse files
committed
[leveler] fix lvladmin debug info if tkinter (or any other PIL feature) search fails
1 parent 011c76d commit f85e42e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

leveler/commands/lvladmin/debugging.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ async def debug_info(self, ctx):
3434
dns_version = None
3535
except Exception as e:
3636
dns_version = e.__class__.__qualname__
37+
# tkinter already failed once due to incorrect installation (?)
38+
pil_features = []
39+
for feature in pilfeatures.get_supported():
40+
try:
41+
feature = (feature, pilfeatures.version(feature) or "N/A")
42+
except Exception as e:
43+
feature = (feature, type(e))
44+
pil_features.append(feature)
3745
# noinspection PyProtectedMember
3846
await ctx.send(
3947
chat.box(
@@ -56,13 +64,7 @@ async def debug_info(self, ctx):
5664
("PIL version", pilfeatures.version("pil")),
5765
(
5866
"PIL features",
59-
tabulate(
60-
[
61-
(feature, pilfeatures.version(feature) or "N/A")
62-
for feature in pilfeatures.get_supported()
63-
],
64-
tablefmt="psql",
65-
),
67+
tabulate(pil_features, tablefmt="psql"),
6668
),
6769
],
6870
tablefmt="psql",

leveler/leveler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Leveler(
2929
):
3030
"""A level up thing with image generation!"""
3131

32-
__version__ = "3.0.9"
32+
__version__ = "3.0.10"
3333

3434
# noinspection PyMissingConstructor
3535
def __init__(self, bot: Red):

0 commit comments

Comments
 (0)