File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def index(self):
29
29
""" Handle server requests. Update on POST. Get status on GET. """
30
30
if self .git == '' :
31
31
self .logger .warning ('Git not configured. Automatic update disabled.' )
32
- return - 1
32
+ return - 1
33
33
if cherrypy .request .method .upper () == 'POST' :
34
34
Thread (target = self .git_update ).start ()
35
35
return 1
@@ -87,8 +87,7 @@ def check_update(self):
87
87
else :
88
88
behind = self .behind_by (current , latest )
89
89
self .logger .info ("Currently " + str (behind ) + " commits behind." )
90
- return (behind , 'https://github.com/%s/%s/compare/%s...%s' % (
91
- self .user , self .repo , current , latest ))
90
+ return behind
92
91
93
92
def git_update (self ):
94
93
""" Do update through git """
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ $(document).ready(function () {
42
42
$ . getJSON ( WEBDIR + 'update/' , function ( data ) {
43
43
if ( data == 0 ) {
44
44
notify ( 'Update' , 'Already running latest version.' , 'success' )
45
- } else if ( $ . isNumeric ( data [ 0 ] && data [ 0 ] > 0 ) ) {
46
- if ( confirm ( 'Your are ' + data [ 0 ] + ' versions behind. Update to latest version?' ) ) {
45
+ } else if ( $ . isNumeric ( data ) && data > 0 ) {
46
+ if ( confirm ( 'Your are ' + data + ' versions behind. Update to latest version?' ) ) {
47
47
$ . post ( WEBDIR + 'update/' , function ( data ) {
48
48
if ( data == 1 ) {
49
49
showModal ( 'Installing update' , '<div class="progress progress-striped active"><div class="bar" style="width:100%"></div></div>' , '' )
You can’t perform that action at this time.
0 commit comments