Skip to content

Commit 4e7e564

Browse files
committed
fixing checking latest version of CK
1 parent f74467a commit 4e7e564

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

Diff for: ck/kernel.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -3725,11 +3725,11 @@ def status(i):
37253725
if len(lversion)<3:
37263726
return {'return':1, 'error':'can\'t parse output from server with version'}
37273727

3728-
if int(lversion[0])>int(version[0]) or \
3729-
(int(lversion[0])==int(version[0]) and int(lversion[1])>int(version[1])) or \
3730-
(int(lversion[0])==int(version[0]) and int(lversion[1])==int(version[1]) and int(lversion[2])>int(version[2])) or \
3731-
(int(lversion[0])==int(version[0]) and int(lversion[1])==int(version[1]) and int(lversion[2])==int(version[2]) and \
3732-
len(version)>3 and version[3]!='' and (len(lversion)==3 or len(lversion)>3 and lversion[3]=='')):
3728+
if int(version[0])>int(lversion[0]) or \
3729+
(int(version[0])==int(lversion[0]) and int(version[1])>int(lversion[1])) or \
3730+
(int(version[0])==int(lversion[0]) and int(version[1])==int(lversion[1]) and int(version[2])>int(lversion[2])) or \
3731+
(int(version[0])==int(lversion[0]) and int(version[1])==int(lversion[1]) and int(version[2])==int(lversion[2]) or \
3732+
(len(lversion)>3 and lversion[3]!='' and (len(version)==3 or len(version)>3 and version[3]==''))):
37333733

37343734
outdated='yes'
37353735

@@ -3744,10 +3744,13 @@ def status(i):
37443744
u=cfg.get('ck_web','')
37453745
if u!='':
37463746
out('')
3747-
out('Visit '+u+' for more details ...')
3747+
out('Just execute "ck pull all" to update CK or visit '+u+' for more details ...')
37483748

3749-
if o=='con' and outdated!='yes':
3750-
out('Your version is up-to-date: V'+version_str)
3749+
if o=='con':
3750+
if outdated!='yes':
3751+
out('Your version is up-to-date: V'+version_str)
3752+
elif outdated=='':
3753+
out('Problem checking version ...')
37513754

37523755
return {'return':0, 'outdated':outdated}
37533756

0 commit comments

Comments
 (0)