From 2d45461dfdaa2b04b5d8a26e70abf0469262a259 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 4 Nov 2020 08:48:09 -0800 Subject: [PATCH] auto-t: simplify copy_to_hotspot Since copy_to_storage can take an arbitrary destination path now we can reuse that instead of duplicating code. --- autotests/util/iwd.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index 775fc6a5..d7235f2d 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -1055,14 +1055,10 @@ class IWD(AsyncOpAbstract): @staticmethod def copy_to_hotspot(source): - import shutil - - assert not os.path.isabs(source) - if not os.path.exists(IWD_STORAGE_DIR + "/hotspot"): os.mkdir(IWD_STORAGE_DIR + "/hotspot") - shutil.copy(source, IWD_STORAGE_DIR + "/hotspot") + IWD.copy_to_storage(source, IWD_STORAGE_DIR + "/hotspot") @staticmethod def copy_to_ap(source):