Skip to content

Commit

Permalink
presubmit/lint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton committed Sep 24, 2024
1 parent ab2b696 commit 95b648f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions build/util/update_group_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,16 +27,19 @@
# `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():
continue
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions components/policy/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 95b648f

Please sign in to comment.