File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import timezone_field
10
10
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 )
13
13
from django .conf import settings
14
14
from django .core .exceptions import MultipleObjectsReturned , ValidationError
15
15
from django .core .validators import MaxValueValidator , MinValueValidator
@@ -339,11 +339,7 @@ def human_readable(self):
339
339
)
340
340
try :
341
341
human_readable = get_description (cron_expression )
342
- except (
343
- MissingFieldException ,
344
- FormatException ,
345
- WrongArgumentException
346
- ):
342
+ except (FormatError , MissingFieldError , WrongArgumentError ):
347
343
return f'{ cron_expression } { str (self .timezone )} '
348
344
return f'{ human_readable } { str (self .timezone )} '
349
345
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ django-timezone-field>=5.0
4
4
backports.zoneinfo; python_version<"3.9"
5
5
tzdata
6
6
python-crontab>=2.3.4
7
- cron-descriptor>=1.2.32
7
+ cron-descriptor>=2.0.0
You can’t perform that action at this time.
0 commit comments