Commit 4eb5c861 authored by Kenvix's avatar Kenvix

Fixed a issue that cause bot initialization failed on headless platform

parent 04185672
...@@ -49,12 +49,16 @@ class DefaultLoginSolver( ...@@ -49,12 +49,16 @@ class DefaultLoginSolver(
} }
tempFile.inputStream().use { tempFile.inputStream().use {
try {
val img = ImageIO.read(it) val img = ImageIO.read(it)
if (img == null) { if (img == null) {
logger.info("无法创建字符图片. 请查看文件") logger.info("无法创建字符图片. 请查看文件")
} else { } else {
logger.info(img.createCharImg()) logger.info(img.createCharImg())
} }
} catch (throwable: Throwable) {
logger.info("创建字符图片时出错(${throwable.toString()})。请查看文件")
}
} }
} }
logger.info("请输入 4 位字母验证码. 若要更换验证码, 请直接回车") logger.info("请输入 4 位字母验证码. 若要更换验证码, 请直接回车")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment