add vendor to sys.path

This commit is contained in:
Maxim Slipenko 2023-09-07 11:43:32 +03:00
parent 3d4a763cbd
commit 458d002142

14
main.py
View File

@ -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()