kkpyutil 1.49.0__tar.gz → 1.49.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/PKG-INFO +1 -1
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/kkpyutil.py +16 -7
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/pyproject.toml +1 -1
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/LICENSE +0 -0
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/README.md +0 -0
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/kkpyutil_helper/windows/kkttssave.ps1 +0 -0
- {kkpyutil-1.49.0 → kkpyutil-1.49.2}/kkpyutil_helper/windows/kkttsspeak.ps1 +0 -0
|
@@ -2148,6 +2148,13 @@ def sync_dirs(src_root, dst_root, logger=glogger, sudo=False):
|
|
|
2148
2148
|
if not _run_sudo_command(cmd, pwd, logger):
|
|
2149
2149
|
logger.error(f'Sync failed with command: {cmd}; you may have entered wrong password')
|
|
2150
2150
|
return False
|
|
2151
|
+
# 3. Step Two: Fix Ownership
|
|
2152
|
+
# -R is recursive. We set it to the user and the 'staff' group.
|
|
2153
|
+
chown_cmd = ['chown', '-R', f'{user}:staff', dst_root]
|
|
2154
|
+
logger.info(f"Setting ownership of {dst_root} to {user}...")
|
|
2155
|
+
if not _run_sudo_command(chown_cmd, pwd, logger):
|
|
2156
|
+
logger.error("Failed to set ownership.")
|
|
2157
|
+
return False
|
|
2151
2158
|
return True
|
|
2152
2159
|
|
|
2153
2160
|
|
|
@@ -3212,11 +3219,14 @@ def json_from_text(json_str):
|
|
|
3212
3219
|
|
|
3213
3220
|
|
|
3214
3221
|
def prompt_macos_admin_password(action="Your operation"):
|
|
3222
|
+
# Use {{ }} to escape curly braces in an f-string for AppleScript lists
|
|
3215
3223
|
applescript = f'''
|
|
3216
|
-
display dialog "{action} requires administrator privileges. Please enter your password:" default answer "" with hidden answer buttons {"Cancel", "OK"} default button "OK"
|
|
3217
|
-
text returned of the result
|
|
3218
|
-
'''
|
|
3224
|
+
display dialog "{action} requires administrator privileges. Please enter your password:" default answer "" with hidden answer buttons {{"Cancel", "OK"}} default button "OK"
|
|
3225
|
+
text returned of the result
|
|
3226
|
+
'''
|
|
3219
3227
|
try:
|
|
3228
|
+
# We add 'with echoing' logic or focus if needed,
|
|
3229
|
+
# but the main fix is the braces below.
|
|
3220
3230
|
result = subprocess.run(
|
|
3221
3231
|
['osascript', '-e', applescript],
|
|
3222
3232
|
capture_output=True,
|
|
@@ -3224,8 +3234,8 @@ text returned of the result
|
|
|
3224
3234
|
check=True
|
|
3225
3235
|
)
|
|
3226
3236
|
return result.stdout.strip()
|
|
3227
|
-
except subprocess.CalledProcessError:
|
|
3228
|
-
#
|
|
3237
|
+
except subprocess.CalledProcessError as e:
|
|
3238
|
+
# If the dialog doesn't show, check e.stderr for AppleScript errors
|
|
3229
3239
|
return None
|
|
3230
3240
|
|
|
3231
3241
|
|
|
@@ -3233,8 +3243,7 @@ text returned of the result
|
|
|
3233
3243
|
|
|
3234
3244
|
|
|
3235
3245
|
def _test():
|
|
3236
|
-
|
|
3237
|
-
print(create_guid())
|
|
3246
|
+
sync_dirs('/Volumes/public/Audio/Tools/WwisePlugins/MiaSidechainRecv/2025.2.3.1/Wwise2023.1/Authoring', '/Library/Application Support/Audiokinetic/Wwise 2023.1.14.8770/Authoring', sudo=True)
|
|
3238
3247
|
|
|
3239
3248
|
|
|
3240
3249
|
if __name__ == '__main__':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|