Skip to content

Commit 881043e

Browse files
committed
DRAFT: Pin cron-descriptor v2
1 parent 66b4434 commit 881043e

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

django_celery_beat/models.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import timezone_field
1010
from celery import current_app, schedules
11-
from cron_descriptor import (FormatException, MissingFieldException,
12-
WrongArgumentException, get_description)
11+
from cron_descriptor import (FormatError, MissingFieldError,
12+
WrongArgumentError, get_description)
1313
from django.conf import settings
1414
from django.core.exceptions import MultipleObjectsReturned, ValidationError
1515
from django.core.validators import MaxValueValidator, MinValueValidator
@@ -339,11 +339,7 @@ def human_readable(self):
339339
)
340340
try:
341341
human_readable = get_description(cron_expression)
342-
except (
343-
MissingFieldException,
344-
FormatException,
345-
WrongArgumentException
346-
):
342+
except (FormatError, MissingFieldError, WrongArgumentError):
347343
return f'{cron_expression} {str(self.timezone)}'
348344
return f'{human_readable} {str(self.timezone)}'
349345

requirements/default.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ django-timezone-field>=5.0
44
backports.zoneinfo; python_version<"3.9"
55
tzdata
66
python-crontab>=2.3.4
7-
cron-descriptor>=1.2.32
7+
cron-descriptor>=2.0.0

0 commit comments

Comments
 (0)