hooks/post_gen_project.py
changeset 8 2025dd476ece
parent 6 ad4d84ea212e
equal deleted inserted replaced
7:f35ba3000688 8:2025dd476ece
    56         try:
    56         try:
    57             target = os.path.join(VAR_DIRECTORY, root, dirname)
    57             target = os.path.join(VAR_DIRECTORY, root, dirname)
    58             os.chown(target, user_id, group_id)
    58             os.chown(target, user_id, group_id)
    59         except PermissionError:
    59         except PermissionError:
    60             print("WARNING: Can't set permissions for directory {0}".format(target))
    60             print("WARNING: Can't set permissions for directory {0}".format(target))
    61     for filename in dirs:
    61     for filename in files:
    62         try:
    62         try:
    63             target = os.path.join(VAR_DIRECTORY, root, filename)
    63             target = os.path.join(VAR_DIRECTORY, root, filename)
    64             os.chown(target, user_id, group_id)
    64             os.chown(target, user_id, group_id)
    65         except PermissionError:
    65         except PermissionError:
    66             print("WARNING: Can't set permissions for file {0}".format(target))
    66             print("WARNING: Can't set permissions for file {0}".format(target))