|
|
|
@ -10,14 +10,28 @@ import sys
|
|
|
|
|
import signal |
|
|
|
|
|
|
|
|
|
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) |
|
|
|
|
sys.path.append(BASE_DIR) |
|
|
|
|
sys.path.insert(0, BASE_DIR) |
|
|
|
|
|
|
|
|
|
from apps import __version__ |
|
|
|
|
try: |
|
|
|
|
from apps import __version__ |
|
|
|
|
except ImportError as e: |
|
|
|
|
print("Not found __version__: {}".format(e)) |
|
|
|
|
print("Sys path: {}".format(sys.path)) |
|
|
|
|
print("Python is: ") |
|
|
|
|
print(subprocess.call('which python', shell=True)) |
|
|
|
|
__version__ = 'Unknown' |
|
|
|
|
try: |
|
|
|
|
import apps |
|
|
|
|
print("List apps: {}".format(os.listdir('apps'))) |
|
|
|
|
print('apps is: {}'.format(apps)) |
|
|
|
|
except: |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
from apps.jumpserver.conf import load_user_config |
|
|
|
|
CONFIG = load_user_config() |
|
|
|
|
except ImportError: |
|
|
|
|
except ImportError as e: |
|
|
|
|
print("Import error: {}".format(e)) |
|
|
|
|
print("Could not find config file, `cp config_example.yml config.yml`") |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|