def check(): if not get_config_value('update.enabled', True): return timestamp = _timestamp() last_check = _get_last_update_check() or timestamp if last_check + get_config_value('update.interval', 86400) > timestamp: return _set_last_update_check(timestamp) info('Checking for Black Mamba updates...') local_release = get_local_release() latest_release = _get_latest_release() if not latest_release: error('Failed to fetch latest release version info') return if local_release: if local_release['tag_name'] == latest_release['tag_name']: info('No updates available, you are up to date') return info('New version available, selfupdate.py will be executed') import blackmamba.ide.script as script if system.PYTHONISTA_BUNDLE_VERSION >= 311015: # 311015 introduced script queues, no need for delay delay = None else: delay = 0.5 script.run_script('site-packages-3/blackmamba/script/selfupdate.py', delay=delay) else: info('Missing installed version info, you should use the installer')
def run(): script.run_script(path)
def run(self, delay=None): script.run_script(self.script_name, delay=delay)
def run_script(item, shift_enter): script.run_script(item.file_path, full_path=True, delay=1.0)