File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def index(self):
2929 """ Handle server requests. Update on POST. Get status on GET. """
3030 if self .git == '' :
3131 self .logger .warning ('Git not configured. Automatic update disabled.' )
32- return - 1
32+ return - 1
3333 if cherrypy .request .method .upper () == 'POST' :
3434 Thread (target = self .git_update ).start ()
3535 return 1
@@ -87,8 +87,7 @@ def check_update(self):
8787 else :
8888 behind = self .behind_by (current , latest )
8989 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
9291
9392 def git_update (self ):
9493 """ Do update through git """
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ $(document).ready(function () {
4242 $ . getJSON ( WEBDIR + 'update/' , function ( data ) {
4343 if ( data == 0 ) {
4444 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?' ) ) {
4747 $ . post ( WEBDIR + 'update/' , function ( data ) {
4848 if ( data == 1 ) {
4949 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