mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-19 07:25:11 +00:00
Merge pull request #156 from CodeName393/Change-minimum-time-for-slow
feat(click): Change the minimum time for slow
This commit is contained in:
@@ -454,8 +454,8 @@ class SlowDelayRange(click.ParamType):
|
|||||||
self.fail(f"'{value}' is not a valid range. Use format: MIN-MAX (e.g., 20-40)", param, ctx)
|
self.fail(f"'{value}' is not a valid range. Use format: MIN-MAX (e.g., 20-40)", param, ctx)
|
||||||
|
|
||||||
low, high = int(match.group(1)), int(match.group(2))
|
low, high = int(match.group(1)), int(match.group(2))
|
||||||
if low < 20:
|
if low < 5:
|
||||||
self.fail(f"Minimum delay must be at least 20 seconds, got {low}", param, ctx)
|
self.fail(f"Minimum delay must be at least 5 seconds, got {low}", param, ctx)
|
||||||
if low > high:
|
if low > high:
|
||||||
self.fail(f"Min ({low}) cannot be greater than max ({high})", param, ctx)
|
self.fail(f"Min ({low}) cannot be greater than max ({high})", param, ctx)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user