diff options
author | Eric Engestrom <[email protected]> | 2018-11-07 13:07:09 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-01-13 13:59:08 +0000 |
commit | bdf6a5c1d2e01aed88a338c403f28a4b9898068e (patch) | |
tree | f7696ecacb43e577328a1bbce65cdfc703b5f83b /src/egl/generate/gen_egl_dispatch.py | |
parent | b938d5fbefe09c67318e88eb869cab016fc6749b (diff) |
egl: fix python lib deprecation warning
DeprecationWarning: the imp module is deprecated in favour of importlib
Instead of complicated logic, just import the file directly.
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/egl/generate/gen_egl_dispatch.py')
-rw-r--r-- | src/egl/generate/gen_egl_dispatch.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/egl/generate/gen_egl_dispatch.py b/src/egl/generate/gen_egl_dispatch.py index eeb3f3f9a5a..d556a7782c9 100644 --- a/src/egl/generate/gen_egl_dispatch.py +++ b/src/egl/generate/gen_egl_dispatch.py @@ -34,7 +34,7 @@ additional information defined in the module eglFunctionList. import argparse import collections -import imp +import eglFunctionList import sys import textwrap @@ -44,15 +44,10 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument("target", choices=("header", "source"), help="Whether to build the source or header file.") - parser.add_argument("func_list_file", help="The function list .py file.") parser.add_argument("xml_files", nargs="+", help="The XML files with the EGL function lists.") args = parser.parse_args() - # The function list is a Python module, but it's specified on the command - # line. - eglFunctionList = imp.load_source("eglFunctionList", args.func_list_file) - xmlFunctions = genCommon.getFunctions(args.xml_files) xmlByName = dict((f.name, f) for f in xmlFunctions) functions = [] |