Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import imp
import importlib
import json
import yaml
import os
Expand Down Expand Up @@ -365,7 +365,7 @@ def load_py(python_file, **kw):
try:
file = os.path.basename(python_file).split('.')[0]
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

topo = module.get_topo(**kw)
if not isinstance(topo, ASTFTopology):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ..common.trex_exceptions import *
from ..common.trex_types import listify
from ..utils.common import ip2int
import imp
import importlib
import collections

def pretty_exceptions(func):
Expand Down Expand Up @@ -2221,7 +2221,7 @@ def load_py (cls, python_file, **kwargs):
try:
file = os.path.basename(python_file).split('.')[0]
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

t = cls.get_module_tunables(module)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import imp
import importlib
import json
import yaml
import os
Expand Down Expand Up @@ -220,7 +220,7 @@ def load_py(python_file, **kw):
try:
file = os.path.basename(python_file).split('.')[0]
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

topo = module.get_topo(**kw)
if not isinstance(topo, TunnelsTopo):
Expand Down Expand Up @@ -350,4 +350,4 @@ def get_data(self):

def to_json(self):
topo = self.get_data()
return json.dumps(topo, sort_keys = True)
return json.dumps(topo, sort_keys = True)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from trex.common.trex_types import listify
from .trex_emu_validator import EMUValidator

import imp
import importlib
import os
import sys
import traceback
Expand Down Expand Up @@ -561,7 +561,7 @@ def load_py(cls, filename, tunables):
try:
file = os.path.basename(filename).split('.')[0]
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

try:
profile = module.register().get_profile(tunables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
import time
import math
import imp
import importlib
from copy import deepcopy

class MultiplierDomain:
Expand Down Expand Up @@ -145,7 +145,7 @@ def load_plugin(cls, plugin_file):
try:
file = os.path.basename(plugin_file).split('.')[0]
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

plugin = module.register()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
import time
import math
import imp
import importlib
from copy import deepcopy


Expand Down Expand Up @@ -218,7 +218,7 @@ def load_plugin(cls, plugin_file):
try:
file = os.path.basename(plugin_file).split('.')[0]
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

plugin = module.register()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import string
import traceback
import copy
import imp
import importlib


from ..common.trex_exceptions import *
Expand Down Expand Up @@ -426,7 +426,7 @@ def load_py(tpg_conf_path, **kwargs):
filename = os.path.basename(tpg_conf_path).split('.')[0] # remove the file extension
sys.dont_write_bytecode = True
module = __import__(filename, globals(), locals(), [], 0) # import the file
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

try:
tpg_conf = module.register().get_tpg_conf(**kwargs)
Expand Down Expand Up @@ -1163,7 +1163,7 @@ def load_py (python_file, direction = 0, port_id = 0, **kwargs):
file = os.path.basename(python_file).split('.')[0]
sys.dont_write_bytecode = True
module = __import__(file, globals(), locals(), [], 0)
imp.reload(module) # reload the update
importlib.reload(module) # reload the update

t = STLProfile.get_module_tunables(module)
#for arg in kwargs:
Expand Down