Skip to content

Commit

Permalink
Fixing pincode wrong type
Browse files Browse the repository at this point in the history
  • Loading branch information
Psychokiller1888 committed Mar 21, 2020
1 parent 4ec1faf commit f77ac9a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/Initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __getitem__(self, item):
try:
return super().__getitem__(item) or ''
except:
print(f'[Initializer] Missing key "{item}" in provided yaml file. Are you using a deprecated yaml file version?')
print(f'[Initializer] Missing key "{item}" in provided yaml file.')
return ''


Expand Down Expand Up @@ -122,12 +122,14 @@ def initProjectAlice(self) -> bool:
if not connected:
self.fatal('Your device needs internet access to continue')

updateChannel = initConfs['aliceUpdateChannel'] if 'aliceUpdateChannel' in initConfs else 'master'
updateSource = self.getUpdateSource(updateChannel)
# Update our system and sources
subprocess.run(['sudo', 'apt-get', 'update'])
subprocess.run(['sudo', 'apt-get', 'dist-upgrade', '-y'])
subprocess.run(['git', 'clean', '-df'])
subprocess.run(['git', 'stash'])
subprocess.run(['git', 'checkout', 'master'])
subprocess.run(['git', 'checkout', updateSource])
subprocess.run(['git', 'pull'])
subprocess.run(['git', 'stash', 'clear'])

Expand Down Expand Up @@ -209,7 +211,7 @@ def initProjectAlice(self) -> bool:
except:
self.logFatal('Pin code must be 4 digits')

confs['adminPinCode'] = pinCode
confs['adminPinCode'] = int(pinCode)

confs['stayCompletlyOffline'] = bool(initConfs['stayCompletlyOffline'])
if initConfs['stayCompletlyOffline']:
Expand Down Expand Up @@ -271,7 +273,7 @@ def initProjectAlice(self) -> bool:
else:
confs['aliceUpdateChannel'] = aliceUpdateChannel

skillsUpdateChannel = initConfs['skillsUpdateChannel']
skillsUpdateChannel = initConfs['skillsUpdateChannel'] if 'skillsUpdateChannel' in initConfs else 'master'
if skillsUpdateChannel not in {'master', 'rc', 'beta', 'alpha'}:
self.logWarning(f'{skillsUpdateChannel} is not a supported updateChannel, only master, rc, beta and alpha are supported. Reseting to master')
confs['skillsUpdateChannel'] = 'master'
Expand Down

0 comments on commit f77ac9a

Please sign in to comment.