diff --git a/hb_internal/build/build.py b/hb_internal/build/build.py index 1fae08a4fc18c542f9313abc93953eedf9c22e0f..d42af7ade51210b36540a3eef906313a4c054be4 100644 --- a/hb_internal/build/build.py +++ b/hb_internal/build/build.py @@ -121,9 +121,11 @@ def add_options(parser): parser.add_argument('--disable-part-of-post-build', default=[], nargs='*', - help='it will skip part of post build process, which includes output_part_rom_status, stat_ccache, generate_ninja_trace, get_warning_list, compute_overlap_rate. ' + help='it will skip part of post build process, which includes output_part_rom_status, \ + stat_ccache, generate_ninja_trace, get_warning_list, compute_overlap_rate. ' 'you can choose which subprocess to skip by passing in parameters. ' - 'eg:--disable-part-of-post-build output_part_rom_status --disable-part-of-post-build stat_ccache') + 'eg:--disable-part-of-post-build output_part_rom_status \ + --disable-part-of-post-build stat_ccache') parser.add_argument('--device-type', help='specifies device type', default='default') diff --git a/hb_internal/preloader/parse_vendor_product_config.py b/hb_internal/preloader/parse_vendor_product_config.py index ed3c2e1bb47489901f67a98bd756be454461398a..7ff2ceb2206c486f142b8d38582570fa82543724 100644 --- a/hb_internal/preloader/parse_vendor_product_config.py +++ b/hb_internal/preloader/parse_vendor_product_config.py @@ -30,7 +30,7 @@ def get_features(features): print("Warning: invalid feature [" + feat + "]") continue key = feat[:match].strip() - val = feat[match+1:].strip().strip('"') + val = feat[match + 1:].strip().strip('"') if val == 'true': feats[key] = True elif val == 'false': @@ -44,6 +44,7 @@ def get_features(features): pairs['features'] = feats return pairs + def get_syscap(syscap): feats = {} for feat in syscap: @@ -53,7 +54,7 @@ def get_syscap(syscap): raise Exception("Error: invalid syscap [{}]".format(feat)) match = feat.index("=") key = feat[:match].strip() - val = feat[match+1:].strip().strip('"') + val = feat[match + 1:].strip().strip('"') if val == 'true': feats[key] = True elif val == 'false': @@ -67,6 +68,7 @@ def get_syscap(syscap): pairs['syscap'] = feats return pairs + def get_exclusion_modules(exclusions): pairs = dict() pairs['exclusions'] = exclusions @@ -97,7 +99,7 @@ def from_ss_to_parts(subsystems): parts.get('{}:{}'.format(ss_name, com_name)).update(pairs) # Copy other key-values for key, val in com.items(): - if key in [ 'component', 'features', 'syscap', 'exclusions' ]: + if key in ['component', 'features', 'syscap', 'exclusions']: continue parts['{}:{}'.format(ss_name, com_name)][key] = val return parts diff --git a/hb_internal/preloader/preloader.py b/hb_internal/preloader/preloader.py index 063166c8165f353bc797bbe647450cb61bb16036..b11aaeda58215e521708740da931b282962822c0 100755 --- a/hb_internal/preloader/preloader.py +++ b/hb_internal/preloader/preloader.py @@ -130,6 +130,7 @@ def _output_parts_features(all_parts, output_file): dump_json_file(output_file, parts_feature_info) return all_features + def _output_parts_syscap(all_parts, output_file): all_syscap = {} part_syscap_map = {} diff --git a/run_shell_cmd.py b/run_shell_cmd.py index 7a3ca2372ff4d8774797e1d8f164920079f9bcea..adcfed5bfa916335b6ab76fc98ba2e4f8a1609ca 100755 --- a/run_shell_cmd.py +++ b/run_shell_cmd.py @@ -20,7 +20,7 @@ import sys def main(): - return subprocess.Popen(' '.join(sys.argv[1:]),shell=True).wait() + return subprocess.Popen(' '.join(sys.argv[1:]), shell=True).wait() if __name__ == '__main__':