diff --git a/build/util/update_group_policy.py b/build/util/update_group_policy.py old mode 100644 new mode 100755 index 6941a116dc4d..cb8371b0e892 --- a/build/util/update_group_policy.py +++ b/build/util/update_group_policy.py @@ -8,10 +8,6 @@ import shutil import hashlib -# for running directly, you can uncomment and run -import sys -sys.path.append('C:\\bb3\\src\\brave\\script') - from brave_chromium_utils import wspath # Chromium stores all group policy definitions under @@ -31,8 +27,10 @@ # `src/components/policy/resources/templates/policy_definitions/` # + def update_policy_files(): - policy_dir = wspath("components/policy/resources/templates/policy_definitions/") + policy_dir = wspath( + "components/policy/resources/templates/policy_definitions/") with os.scandir(policy_dir) as entries: for entry in entries: if not entry.is_dir(): @@ -40,7 +38,8 @@ def update_policy_files(): src_dir = entry.path src_dir_name = entry.name dst_dir = wspath( - f"//components/policy/resources/templates/policy_definitions/{src_dir_name}") + f"//components/policy/resources/templates/policy_definitions/{src_dir_name}" + ) shutil.copytree(src_dir, dst_dir, dirs_exist_ok=True, diff --git a/chromium_src/components/policy/tools/generate_policy_source.py b/chromium_src/components/policy/tools/generate_policy_source.py index 1bd142b8d0cb..7552093a7e14 100644 --- a/chromium_src/components/policy/tools/generate_policy_source.py +++ b/chromium_src/components/policy/tools/generate_policy_source.py @@ -19,8 +19,7 @@ def AddBravePolicies(template_file_contents): # components/policy/resources/templates/policies.yaml # highest_id = template_file_contents['highest_id_currently_used'] - policies = [ - ] + policies = [] # Our new polices are added with highest id next_id = highest_id + 1 diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn index f4a35f973de2..2ad89a2af608 100644 --- a/components/policy/BUILD.gn +++ b/components/policy/BUILD.gn @@ -12,9 +12,9 @@ if (is_win) { action("pack_policy_templates") { chrome_pack_policy_templates = "//components/policy:pack_policy_templates" deps = [ - "//components/policy:policy_templates", "//components/policy:generate_policy_templates", - chrome_pack_policy_templates + "//components/policy:policy_templates", + chrome_pack_policy_templates, ] script = "pack_policy_templates.py" chrome_policy_templates_zip =