From 24809582d4850190d87cd8eb8180d0dce215dbdf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 15 Nov 2018 15:04:02 +0000 Subject: scripts: Remove deprecated imp module usage The imp module is deprecated, port the code over to use importlib as recently done for bb.utils as well. Signed-off-by: Richard Purdie --- scripts/pythondeps | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts/pythondeps') diff --git a/scripts/pythondeps b/scripts/pythondeps index 590b9769e7..3e13a587ee 100755 --- a/scripts/pythondeps +++ b/scripts/pythondeps @@ -9,7 +9,8 @@ import argparse import ast -import imp +import importlib +from importlib import machinery import logging import os.path import sys @@ -17,10 +18,7 @@ import sys logger = logging.getLogger('pythondeps') -suffixes = [] -for triple in imp.get_suffixes(): - suffixes.append(triple[0]) - +suffixes = importlib.machinery.all_suffixes() class PythonDepError(Exception): pass -- cgit 1.2.3-korg