Skip to content

Commit

Permalink
🍻 change import error message
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Dec 18, 2024
1 parent ebe32d7 commit 5ebeae8
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 210 deletions.
6 changes: 5 additions & 1 deletion arclet/entari/builtins/auto_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
from arclet.letoderea import es
from launart import Launart, Service, any_completed
from launart.status import Phase
from watchfiles import PythonFilter, awatch

try:
from watchfiles import PythonFilter, awatch
except ModuleNotFoundError:
raise ImportError("Please install `watchfiles` first. Install with `pip install arclet-entari[reload]`")

from arclet.entari import Plugin, declare_static, dispose_plugin, load_plugin, metadata
from arclet.entari.config import EntariConfig
Expand Down
4 changes: 2 additions & 2 deletions arclet/entari/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ def crontab(cron_str: str):
"""
try:
from croniter import croniter
except ImportError:
raise ImportError("Please install croniter to use cron expression") from None
except ModuleNotFoundError:
raise ImportError("Please install `croniter` first. Install with `pip install arclet-entari[cron]`") from None

it = croniter(cron_str, datetime.now())

Expand Down
Loading

0 comments on commit 5ebeae8

Please sign in to comment.