mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix line length CQ
This commit is contained in:
parent
cda2120579
commit
1cfc926b16
@ -104,7 +104,8 @@ class Helpers:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def which_java():
|
def which_java():
|
||||||
# Adapted from LeeKamentsky's https://github.com/LeeKamentsky/python-javabridge/blob/master/javabridge/locate.py
|
# Adapted from LeeKamentsky >>>
|
||||||
|
# https://github.com/LeeKamentsky/python-javabridge/blob/master/javabridge/locate.py
|
||||||
jdk_key_paths = (
|
jdk_key_paths = (
|
||||||
"SOFTWARE\\JavaSoft\\JDK",
|
"SOFTWARE\\JavaSoft\\JDK",
|
||||||
"SOFTWARE\\JavaSoft\\Java Development Kit",
|
"SOFTWARE\\JavaSoft\\Java Development Kit",
|
||||||
|
@ -236,7 +236,8 @@ class ServerInstance:
|
|||||||
self.server_command = Helpers.cmdparse(self.settings["execution_command"])
|
self.server_command = Helpers.cmdparse(self.settings["execution_command"])
|
||||||
if self.helper.is_os_windows() and self.server_command[0] == "java":
|
if self.helper.is_os_windows() and self.server_command[0] == "java":
|
||||||
logger.info(
|
logger.info(
|
||||||
"Detected nebulous java in start command. Replacing with full java path."
|
"Detected nebulous java in start command. "
|
||||||
|
"Replacing with full java path."
|
||||||
)
|
)
|
||||||
which_java_raw = self.helper.which_java()
|
which_java_raw = self.helper.which_java()
|
||||||
java_path = which_java_raw + "\\bin\\java"
|
java_path = which_java_raw + "\\bin\\java"
|
||||||
@ -246,7 +247,8 @@ class ServerInstance:
|
|||||||
self.server_command[0] = java_path
|
self.server_command[0] = java_path
|
||||||
else:
|
else:
|
||||||
logger.critcal(
|
logger.critcal(
|
||||||
"Possible attack detected. User attempted to exec java binary from server directory."
|
"Possible attack detected. User attempted to exec "
|
||||||
|
"java binary from server directory."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
self.server_path = Helpers.get_os_understandable_path(self.settings["path"])
|
self.server_path = Helpers.get_os_understandable_path(self.settings["path"])
|
||||||
|
Loading…
Reference in New Issue
Block a user