Skip to content

Commit bc24f08

Browse files
Update - script fixes
1 parent f195fc0 commit bc24f08

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

buildroot/share/PlatformIO/scripts/lerdge.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def encryptByte(byte):
1919
return byte
2020

2121
def encrypt_file(input_file, output_file, file_length):
22-
input = bytearray(input_file.read())
23-
for i, byte in enumerate(input):
24-
input[i] = encryptByte(byte)
25-
output_file.write(input)
22+
input_data = bytearray(input_file.read())
23+
for i, byte in enumerate(input_data):
24+
input_data[i] = encryptByte(byte)
25+
output_file.write(input_data)
2626

2727
# Encrypt ${PROGNAME}.bin and save it with the name given in build.crypt_lerdge
2828
def encrypt(source, target, env):

buildroot/share/PlatformIO/scripts/open_explorer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ def open_file_explorer():
1717
os.startfile(script)
1818
except OSError:
1919
try:
20-
subprocess.run(["explorer", str(script)], check=True)
20+
subprocess.run(["explorer", str(script)], shell=False, check=True)
2121
except Exception as e:
2222
print(f"Could not open File Explorer, an error occurred: {e}")
2323
elif current_OS == "Linux":
2424
try:
25-
subprocess.run(["xdg-open", str(script)], check=True)
25+
subprocess.run(["xdg-open", str(script)], shell=False, check=True)
2626
except Exception as e:
2727
print(f"Could not open File Explorer, an error occurred: {e}")

buildroot/share/PlatformIO/scripts/preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def run_preprocessor(env, fn=None):
4040
cmd += ["-D__MARLIN_DEPS__", "-w", "-dM", "-E", "-x", "c++", filename]
4141
blab(" ".join(cmd))
4242
try:
43-
define_list = subprocess.check_output(cmd).splitlines()
43+
define_list = subprocess.check_output(cmd, shell=False).splitlines()
4444
except:
4545
define_list = {}
4646
preprocessor_cache[filename] = define_list

buildroot/share/fonts/genallfont.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ for ALANG in ${LANG_ARG:=$LANGS_DEFAULT} ; do
9090
sed -i fontutf8-data.h -e 's|fonts//|fonts/|g' -e 's|fonts//|fonts/|g' -e 's|[/0-9a-zA-Z_\-]*buildroot/share/fonts|buildroot/share/fonts|' 2>/dev/null
9191
cd - >/dev/null
9292
mv ${DN_WORK}/fontutf8-data.h src/lcd/dogm/fontdata/langdata_${ALANG}.h
93-
rm -rf ${DN_WORK}/*
93+
rm -rf "${DN_WORK}"/*
9494
done
9595

9696
rm -rf ${DN_WORK}

buildroot/share/scripts/createTemperatureLookupMarlin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from math import *
2424
import sys, getopt
2525

26-
"""Constants"""
26+
# Constants
2727
ZERO = 273.15 # Zero point of Kelvin scale
2828
VADC = 5 # ADC voltage
2929
VCC = 5 # Supply voltage

0 commit comments

Comments
 (0)