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.
This commit is contained in:
James Prestwood 2020-11-04 08:48:09 -08:00 committed by Denis Kenzior
parent efe53e28c8
commit 2d45461dfd
1 changed files with 1 additions and 5 deletions

View File

@ -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):