Skip to content

Commit dcd2b0f

Browse files
committed
fix: improve bunkerweb version check for Job initialization
1 parent 1e6e375 commit dcd2b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crowdsec/jobs/crowdsec-conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
LOGGER.info("CrowdSec is not activated, skipping job...")
3838
sys_exit(status)
3939

40-
bunkerweb_version = get_version()
41-
if int(bunkerweb_version.split(".")[1]) < 6:
40+
bunkerweb_version_split = get_version().split(".")
41+
if len(bunkerweb_version_split) > 1 and int(bunkerweb_version_split[1]) < 6:
4242
JOB = Job(LOGGER)
4343
else:
4444
JOB = Job(LOGGER, __file__)

0 commit comments

Comments
 (0)