/vpp/src/tools/vppapigen/vppapigen:823: DeprecationWarning:
the imp module is deprecated in favour of importlib;
see the module's documentation for alternative uses
Change-Id: If7729778374e9193f6381c8bd2ed34c875db3f1e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
from __future__ import print_function
import ply.lex as lex
from __future__ import print_function
import ply.lex as lex
self.name = name
if isinstance(alias, Array):
self.name = name
if isinstance(alias, Array):
- a = { 'type': alias.fieldtype,
- 'length': alias.length }
+ a = { 'type': alias.fieldtype, # noqa: E201
+ 'length': alias.length } # noqa: E202
- a = { 'type': alias.fieldtype }
+ a = { 'type': alias.fieldtype } # noqa: E201,E202
self.alias = a
self.crc = binascii.crc32(str(alias).encode()) & 0xffffffff
global_crc = binascii.crc32(str(alias).encode(), global_crc)
self.alias = a
self.crc = binascii.crc32(str(alias).encode()) & 0xffffffff
global_crc = binascii.crc32(str(alias).encode(), global_crc)
#
# Generate representation
#
#
# Generate representation
#
+ from importlib.machinery import SourceFileLoader
# Default path
pluginpath = ''
# Default path
pluginpath = ''
args.output_module.lower())
try:
args.output_module.lower())
try:
- plugin = imp.load_source(args.output_module, module_path)
+ plugin = SourceFileLoader(args.output_module,
+ module_path).load_module()
except Exception as err:
raise Exception('Error importing output plugin: {}, {}'
.format(module_path, err))
except Exception as err:
raise Exception('Error importing output plugin: {}, {}'
.format(module_path, err))