Dont fail to run if the update check fails
This commit is contained in:
parent
670de085a3
commit
ddb961f9af
@ -97,14 +97,20 @@ def process_current_release(raw):
|
|||||||
|
|
||||||
|
|
||||||
def update_check(timer_id=None):
|
def update_check(timer_id=None):
|
||||||
p = subprocess.Popen([
|
try:
|
||||||
kitty_exe(), '+runpy',
|
p = subprocess.Popen([
|
||||||
'from kitty.update_check import *; import time, random; time.sleep(random.randint(1000, 4000) / 1000); print(get_released_version())'
|
kitty_exe(), '+runpy',
|
||||||
], stdout=subprocess.PIPE)
|
'from kitty.update_check import *; import time, random; time.sleep(random.randint(1000, 4000) / 1000); print(get_released_version())'
|
||||||
|
], stdout=subprocess.PIPE)
|
||||||
|
except EnvironmentError:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
return False
|
||||||
monitor_pid(p.pid)
|
monitor_pid(p.pid)
|
||||||
get_boss().set_update_check_process(p)
|
get_boss().set_update_check_process(p)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def run_update_check(interval=24 * 60 * 60):
|
def run_update_check(interval=24 * 60 * 60):
|
||||||
update_check()
|
if update_check():
|
||||||
add_timer('update_check', update_check, interval)
|
add_timer('update_check', update_check, interval)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user