Skip to content

Commit 31fa0e8

Browse files
committed
Use new update script name.
1 parent 55013c5 commit 31fa0e8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

myDevices/cloud/updater.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from myDevices.utils.config import Config
1111
from myDevices.utils.subprocess import executeCommand
1212

13-
SETUP_NAME = 'myDevicesSetup_raspberrypi.sh'
13+
SETUP_NAME = 'update_raspberrypi.sh'
1414
INSTALL_PATH = '/etc/myDevices/'
1515
UPDATE_PATH = INSTALL_PATH + 'updates/'
1616
UPDATE_CFG = UPDATE_PATH + 'updatecfg'
@@ -52,7 +52,7 @@ def __init__(self, config, onUpdateConfig = None):
5252
self.Continue = True
5353
self.currentVersion = ''
5454
self.newVersion = ''
55-
self.downloadUrl = ''
55+
# self.downloadUrl = ''
5656
self.UpdateCleanup()
5757
self.startTime = datetime.now() - timedelta(days=1)
5858

@@ -146,9 +146,12 @@ def RetrieveUpdate(self):
146146
updateConfig = Config(UPDATE_CFG)
147147
try:
148148
self.newVersion = updateConfig.get('UPDATES','Version')
149-
self.downloadUrl = updateConfig.get('UPDATES','Url')
150149
except:
151-
error('Updater missing: update version or Url')
150+
error('Updater missing version')
151+
# try:
152+
# self.downloadUrl = updateConfig.get('UPDATES','Url')
153+
# except:
154+
# error('Updater missing url')
152155
info('Updater retrieve update success')
153156
return True
154157
except:
@@ -157,7 +160,7 @@ def RetrieveUpdate(self):
157160

158161
def DownloadFile(self, url, localPath):
159162
try:
160-
info( url + ' ' + localPath)
163+
info(url + ' ' + localPath)
161164
with urlopen(url) as response:
162165
with open(localPath, 'wb') as output:
163166
output.write(response.read())

0 commit comments

Comments
 (0)