mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-30 02:12:38 +00:00
importlib refactor LFRequest.py
This commit is contained in:
@@ -2,18 +2,22 @@
|
||||
# Class holds default settings for json requests -
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
import sys
|
||||
import os
|
||||
import importlib
|
||||
import urllib
|
||||
from urllib import request
|
||||
from urllib import error
|
||||
from urllib import parse
|
||||
import json
|
||||
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
import urllib
|
||||
from urllib import request
|
||||
from urllib import error
|
||||
from urllib import parse
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
|
||||
|
||||
import json
|
||||
from . import LFUtils
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
class LFRequest:
|
||||
|
||||
Reference in New Issue
Block a user