commit ac0b12ca333dcad58773b815925d69d9186e76d0
parent 0a44281b824a6fd0adb10f37bb0d9b813d8f436d
Author: rob <rob@tarina.org>
Date: Thu, 9 May 2019 02:12:08 +0300
must sleep
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -315,17 +315,12 @@ def update(tarinaversion, tarinavername):
if round(float(tarinaversion),3) < round(float(versionnumber),3):
writemessage('New version found ' + versionnumber[:-1] + ' ' + versionname[:-1])
time.sleep(4)
- timeleft = 0
- while timeleft < 5:
- writemessage('Updating in ' + str(3 - timeleft) + ' seconds.')
- time.sleep(1)
- timeleft = timeleft + 1
writemessage('Updating...')
os.system('git pull')
writemessage('Update done, will now reboot Tarina')
waitforanykey()
writemessage('Hold on rebooting Tarina...')
- os.system('reboot')
+ os.system('sudo reboot')
writemessage('Version is up-to-date!')
return tarinaversion, tarinavername
@@ -1022,8 +1017,9 @@ def webz_on():
socket.create_connection(("www.google.com", 80))
return True
except OSError:
- writemessage('No internet connection!')
- time.sleep(2)
+ pass
+ writemessage('No internet connection!')
+ time.sleep(2)
return False
#-------------Upload film------------