commit 6ac30f7a7dc488048928c825d9d1cdffc05e4b50
parent d6a9c896c925a0bc9e5f03aa27f61e6fe72660ea
Author: Robin Bäckman <robinbackman@gmail.com>
Date: Tue, 26 Jul 2016 17:43:15 +0000
error if no internet connection while updating
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -400,10 +400,14 @@ def browse2(filmname, filmfolder, scene, shot, take, n, b):
#-------------Update------------------
def update(tarinaversion, tarinavername):
- writemessage('Current version ' + tarinaversion + ' ' + tarinavername)
+ writemessage('Current version ' + tarinaversion[:-1] + ' ' + tarinavername[:-1])
time.sleep(2)
writemessage('Checking for updates...')
- os.system('wget https://bitbucket.org/rbckman/tarina/raw/a23ea77fee134dc03da72a38c269a4d34317ce87/VERSION -P /tmp/')
+ try:
+ os.system('wget https://bitbucket.org/rbckman/tarina/raw/a23ea77fee134dc03da72a38c269a4d34317ce87/VERSION -P /tmp/')
+ except:
+ writemessage('Sorry buddy, no internet connection')
+ return tarinaversion, tarinavername
f = open('/tmp/VERSION')
versionnumber = f.readline()
versionname = f.readline()