diff --git a/naxalnet/network.py b/naxalnet/network.py index fae8df6..37b4101 100644 --- a/naxalnet/network.py +++ b/naxalnet/network.py @@ -23,7 +23,6 @@ TODO: Add more details """ from pathlib import Path -from shutil import copy from dasbus.connection import SystemMessageBus @@ -31,13 +30,6 @@ NETWORKD_BUS = "org.freedesktop.network1" NETWORKD_PATH = "/org/freedesktop/network1" -def copy_glob(directory: str, glob: str, destination: str) -> None: - """copy files in directory matching the glob to destination""" - match = Path(directory).glob(glob) - for i in match: - copy(i, destination) - - class NetworkD: """control systemd-networkd""" diff --git a/naxalnet/scripts.py b/naxalnet/scripts.py index 0802330..5a2b307 100644 --- a/naxalnet/scripts.py +++ b/naxalnet/scripts.py @@ -28,7 +28,6 @@ When run from the commandline, the function main() is called. import sys from pathlib import Path -from shutil import copy from dasbus.error import DBusError from systemd.daemon import notify from naxalnet import __version__ @@ -43,9 +42,9 @@ from naxalnet.network import NetworkD def get_sorted_glob(directory: str, glob: str): """return sorted list of filenames matching glob""" path = Path(directory) - g = path.glob(glob) + glob_list = path.glob(glob) sorted_list = [] - for i in g: + for i in glob_list: # g is a list of PosixPath objects. # So we add their absolute path as str. sorted_list.append(str(i))