Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2021-10-15 02:30:59 -06:00
commit dc9565185c
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
4 changed files with 17 additions and 7 deletions

View file

@ -48,7 +48,7 @@ REGEX_SDIO_NETWORK_DRIVERS = re.compile(
)
REGEX_TORRENT_INDICES = re.compile(r'^(?P<index>\d+)\|(?P<path>.*)')
SEVEN_ZIP = get_tool_path('7-Zip', '7za')
SEVEN_ZIP_FULL = get_tool_path('7-Zip', '7z') # TODO: Replace with unrar from Pypi?
SEVEN_ZIP_FULL = get_tool_path('7-Zip', '7z', check=False) # TODO: Replace with unrar from Pypi?
WIDTH = 50

View file

@ -175,11 +175,15 @@ def end_session(menus):
LOG.error("Failed to remove scheduled task or it doesn't exist.")
# Disable Autologon
autologon_selected = reg_read_value(
'HKCU', AUTO_REPAIR_KEY, 'Use Autologon',
)
try:
autologon_selected = reg_read_value(
'HKCU', AUTO_REPAIR_KEY, 'Use Autologon',
)
except FileNotFoundError:
autologon_selected = False
# Assuming it isn't being used
if autologon_selected and is_autologon_enabled():
run_tool('Sysinternals', 'Autologon', download=True)
run_tool('Sysinternals', 'Autologon', '-accepteula', download=True)
reg_set_value(
'HKLM', r'Software\Microsoft\Windows NT\CurrentVersion\Winlogon',
'AutoAdminLogon', '0', 'SZ',
@ -257,7 +261,7 @@ def init_run(options):
if options['Use Autologon']['Selected'] and not is_autologon_enabled():
TRY_PRINT.run(
'Running Autologon...', run_tool,
'Sysinternals', 'Autologon',
'Sysinternals', 'Autologon', '-accepteula',
download=True, msg_good='DONE',
)
if options['Sync Clock']['Selected']:

View file

@ -920,7 +920,11 @@ def get_firefox_default_profile(profiles_ini):
# Parse INI
parser = configparser.ConfigParser()
parser.read(profiles_ini)
try:
parser.read(profiles_ini)
except (configparser.ParsingError, UnicodeError):
# Assuming we have the wrong encoding
parser.read(profiles_ini, encoding='utf-16')
for section in parser.sections():
if section.lower().startswith('install'):
default_profile = parser[section].get('default')

View file

@ -662,3 +662,5 @@ DecimalSeparator=.
ThousandsSeparator=,
CsvSeparator=,
TextButtons=0
SensorToolTips=0