From 9b533b6c76e50d53608eee3aa74f37e7be3c5730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Avic=20Simmons?= Date: Sat, 5 Sep 2026 14:49:04 -0400 Subject: [PATCH] docs: fix 19 typos in comments, docstrings and log messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrects misspellings and doc inaccuracies in comments, docstrings and log strings. No functional changes to program logic. Signed-off-by: Léon Avic Simmons --- XBLConfig/commons.py | 2 +- dtlogger.py | 8 ++++---- get_qsahara_files.py | 2 +- sign.py | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/XBLConfig/commons.py b/XBLConfig/commons.py index f2f5149..fbacc8e 100644 --- a/XBLConfig/commons.py +++ b/XBLConfig/commons.py @@ -122,7 +122,7 @@ def print_error_exit(error_msg="missing"): exit(-1) ############################################################################## -# roundup - returns offset 'x' with aligment 'precision' +# roundup - returns offset 'x' with alignment 'precision' ############################################################################## def roundup(x, precision): if precision == 0: diff --git a/dtlogger.py b/dtlogger.py index 85560a2..ec5cb3e 100644 --- a/dtlogger.py +++ b/dtlogger.py @@ -14,12 +14,12 @@ def logger_init(log_file=None, log_level=logging.DEBUG, max_file_size_mb=1): """ - Initialize dt logger。 + Initialize dt logger. Args: - log_file (str): log file path。if it is None,only print to console。 - log_level (int): log level(logging.INFO、logging.DEBUG)。 - max_file_size_mb (int): Maxmin log file size(MB)。 + log_file (str): log file path.if it is None,only print to console. + log_level (int): log level(logging.INFO, logging.DEBUG). + max_file_size_mb (int): Maximum log file size(MB). """ logger.setLevel(log_level) diff --git a/get_qsahara_files.py b/get_qsahara_files.py index af8459e..43ab4f6 100644 --- a/get_qsahara_files.py +++ b/get_qsahara_files.py @@ -17,7 +17,7 @@ def get_all_sahara_files(meta_root_path, flavor=None, storage='ufs', firehose_ty Initializes meta_info and uses get_qsahara_files to list Sahara files. Args: - contents_xml_path (str): Path to the contents.xml file of the meta-build. + meta_root_path (str): Path to the root of the meta-build containing contents.xml. flavor (str, optional): The flavor to filter by. Defaults to None. storage (str, optional): The storage type to filter by. Defaults to None. firehose_type (str, optional): The firehose type to filter by. Defaults to None. diff --git a/sign.py b/sign.py index 39a85f6..d244d7e 100644 --- a/sign.py +++ b/sign.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause-Clear """ @file sign.py -This file contains the interface of signature. it will call sectools v2 for signing. +This file contains the interface of signature. It will call sectools v2 for signing. """ #from asyncio import exceptions from dis import disassemble @@ -37,8 +37,8 @@ def sign_config_image(self): dtlogger.info('Error of reading signing mode command json file.') dtlogger.info(e) return False - # If signing command doesn't contain --image-id option, fetch it from origninal DTB elf. If the orginal DTB elf is unsigned DTB elf. - # If the orginal DTB elf is unsigned DTB elf, it will popout a warning windows and termined signing process. + # If signing command doesn't contain --image-id option, fetch it from original DTB elf. If the original DTB elf is unsigned DTB elf. + # If the original DTB elf is unsigned DTB elf, it will pop out a warning window and terminate the signing process. if '--image-id' not in data.keys(): # fetch Software ID from DTB elfs by sectools inspect command sign_id_cmd = r'%s secure-image --inspect %s' % (os.path.join(gf['sectoolsDir'],self.sectool_name), gf['inputFile']) @@ -46,7 +46,7 @@ def sign_config_image(self): stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True,shell=True) - dtlogger.info ('Waiting for secure inspect commnad excute done') + dtlogger.info ('Waiting for secure inspect command execute done') while True: out, err= proc.communicate() dtlogger.info (out) @@ -63,7 +63,7 @@ def sign_config_image(self): dtlogger.info("{} err".format(line)) return False if proc.poll() != None: - dtlogger.info ('secure inspect commnad excute done') + dtlogger.info ('secure inspect command execute done') break if sign_id_num: # fetch image ID from profile xml according software ID. @@ -80,7 +80,7 @@ def sign_config_image(self): if gf['sign_id']== '': raise Exception('ERROR:Signed DTB elf failed', 'Please provide sign ID for the DTB elf\n') - # excute sign command seperately + # execute sign command separately # Debugged so signing works outfile = "" dtlogger.info("{}{}".format(gf['outputPath'],gf['outputFile'])) @@ -107,7 +107,7 @@ def sign_config_image(self): cmd.append(command) cmd.append(data["SigningCommand"][command]) - dtlogger.info('Excute Signing Command:\n{}'.format(cmd)) + dtlogger.info('Execute Signing Command:\n{}'.format(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,