Appease the linter

This commit is contained in:
Andrew 2022-11-19 18:21:10 -05:00
parent 671a5188c2
commit e8564566ed

View File

@ -596,17 +596,19 @@ class ServerInstance:
if Helpers.check_file_perms(run_file_path) and os.path.isfile(
run_file_path
):
run_file = open(run_file_path, "r")
run_file = open(run_file_path, "r", encoding="utf-8")
run_file_text = run_file.read()
else:
Console.error(
"ERROR ! Forge install can't read the scripts files. Aborting ..."
"ERROR ! Forge install can't read the scripts files."
" Aborting ..."
)
return
# We get the server command parameters from forge script
server_command = re.findall(
r"java @([a-zA-Z0-9_\.]+) @([a-z.\/\-]+)([0-9.\-]+)\/\b([a-z_0-9]+\.txt)\b( .{2,4})?",
r"java @([a-zA-Z0-9_\.]+)"
r" @([a-z.\/\-]+)([0-9.\-]+)\/\b([a-z_0-9]+\.txt)\b( .{2,4})?",
run_file_text,
)[0]
@ -620,7 +622,10 @@ class ServerInstance:
# Now lets set up the new run command.
# This is based off the run.sh/bat that
# Forge uses in 1.16 and <
execution_command = f"java @{server_command[0]} @{executable_path}{server_command[3]} nogui {server_command[4]}"
execution_command = (
f"java @{server_command[0]}"
f" @{executable_path}{server_command[3]} nogui {server_command[4]}"
)
server_obj.execution_command = execution_command
Console.debug("SUCCESS! Forge install completed")