1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Fixed consoled app

This commit is contained in:
Retspen 2015-03-27 11:22:38 +02:00
parent 6604aa9d11
commit f5ce432c56
3 changed files with 14 additions and 14 deletions

View file

@ -2,36 +2,36 @@
import os
import sys
import django
DIR_PATH = os.path.dirname(os.path.abspath(__file__))
ROOT_PATH = os.path.abspath(os.path.join(DIR_PATH, '..', ''))
# VENV_PATH = ROOT_PATH + '/venv/lib/python2.7/site-packages'
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings")
CERT = DIR_PATH + '/cert.pem'
if ROOT_PATH not in sys.path:
sys.path.append(ROOT_PATH)
# if VENV_PATH not in sys.path:
# sys.path.append(VENV_PATH)
django.setup()
# VENV_PATH = ROOT_PATH + '/venv/lib/python2.7/site-packages'
# if VENV_PATH not in sys.path:
# sys.path.append(VENV_PATH)
import re
import Cookie
import socket
from webvirtcloud.settings import WS_PORT
from webvirtcloud.settings import WS_HOST
from webvirtcloud.settings import WS_CERT
from vrtManager.connection import CONN_SSH, CONN_SOCKET
from tunnel import Tunnel
if WS_CERT:
CERT = WS_CERT
from vrtManager.connection import CONN_SSH, CONN_SOCKET
import re
from tunnel import Tunnel
try:
from websockify import WebSocketProxy
try:
from websockify import ProxyRequestHandler
except ImportError:
@ -50,7 +50,7 @@ except ImportError:
def get_connection_infos(token):
from instance.models import Instance
from instances.models import Instance
from vrtManager.instance import wvmInstance
try: