Skip to content

Commit

Permalink
Ran black on utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
victor5lm committed Sep 10, 2024
1 parent c1b80ad commit 2ddb2f4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions bu_isciii/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,22 @@ def remake_permissions(copied_folder_path, permissions_config):
copied_folder_path: The path to the folder that was copied
permissions_config: Dictionary containing permissions configuration (e.g., {'directory_chmod': '755', 'file_chmod': '664'})
"""
subprocess.run(f"chown -R $(whoami):bi {copied_folder_path}", shell=True, check=True)
subprocess.run(
f"chown -R $(whoami):bi {copied_folder_path}", shell=True, check=True
)

# Change permissions for directories
if "directory_chmod" in permissions_config:
subprocess.run(f"find {copied_folder_path} -type d -exec chmod {permissions_config['directory_chmod']} {{}} \;", shell=True, check=True)
subprocess.run(
f"find {copied_folder_path} -type d -exec chmod {permissions_config['directory_chmod']} {{}} \;",
shell=True,
check=True,
)

# Change permissions for files
if "file_chmod" in permissions_config:
subprocess.run(f"find {copied_folder_path} -type f -exec chmod {permissions_config['file_chmod']} {{}} \;", shell=True, check=True)
subprocess.run(
f"find {copied_folder_path} -type f -exec chmod {permissions_config['file_chmod']} {{}} \;",
shell=True,
check=True,
)

0 comments on commit 2ddb2f4

Please sign in to comment.