mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
added is_installed function to legacy_io
This commit is contained in:
parent
b81dbf9ee4
commit
3aa88814a1
1 changed files with 6 additions and 2 deletions
|
|
@ -18,9 +18,13 @@ _database = database = None
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def is_installed():
|
||||
return module._is_installed
|
||||
|
||||
|
||||
def install():
|
||||
"""Establish a persistent connection to the database"""
|
||||
if module._is_installed:
|
||||
if is_installed():
|
||||
return
|
||||
|
||||
session = session_data_from_environment(context_keys=True)
|
||||
|
|
@ -55,7 +59,7 @@ def uninstall():
|
|||
def requires_install(func):
|
||||
@functools.wraps(func)
|
||||
def decorated(*args, **kwargs):
|
||||
if not module._is_installed:
|
||||
if not is_installed():
|
||||
install()
|
||||
return func(*args, **kwargs)
|
||||
return decorated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue