Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Split compatibility / updates check, updates last
Browse files Browse the repository at this point in the history
  • Loading branch information
zrzka committed Oct 27, 2017
1 parent d17dd77 commit 86e4fb0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions blackmamba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def save_all():


@system.Pythonista(appex=False)
def _check_compatibility_and_updates():
def _check_compatibility():
import blackmamba.update
info('Pythonista {} ({})'.format(system.PYTHONISTA_VERSION, system.PYTHONISTA_BUNDLE_VERSION))

Expand All @@ -194,6 +194,10 @@ def _check_compatibility_and_updates():
_LATEST_VERSION_COMPATIBILITY_TEST[0]))
error('Update Black Mamba or use at your own risk')


@system.Pythonista(appex=False)
def _check_for_updates():
import blackmamba.update
blackmamba.update.check()


Expand All @@ -206,11 +210,12 @@ def _main(config=None):
info('Black Mamba initialization...')
if config:
update_config_with_dict(config)
_check_compatibility_and_updates()
_check_compatibility()
if get_config_value('general.register_key_commands', True):
_register_default_key_commands()
_register_ios11_default_key_commands()
info('Black Mamba initialized')
_check_for_updates()


def main(config=None):
Expand Down

0 comments on commit 86e4fb0

Please sign in to comment.