add vendor to sys.path
This commit is contained in:
parent
3d4a763cbd
commit
458d002142
14
main.py
14
main.py
@ -2,12 +2,18 @@ import httplib
|
||||
import hashlib
|
||||
import json
|
||||
import argparse
|
||||
import os
|
||||
import socket
|
||||
import urllib
|
||||
import ConfigParser
|
||||
from os.path import abspath
|
||||
from netaddr import IPAddress, IPNetwork
|
||||
import os
|
||||
import sys
|
||||
|
||||
parent_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
vendor_dir = os.path.join(parent_dir, 'vendor')
|
||||
|
||||
sys.path.append(vendor_dir)
|
||||
|
||||
from netaddr import IPNetwork
|
||||
|
||||
|
||||
class KeeneticAPI:
|
||||
@ -110,7 +116,7 @@ def start(args):
|
||||
for route in old_routes:
|
||||
api.remove_ip_route(route)
|
||||
|
||||
routes_dir = abspath(config.get('app', 'dir'))
|
||||
routes_dir = os.path.abspath(config.get('app', 'dir'))
|
||||
|
||||
routes = list()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user